1
This commit is contained in:
parent
b42dfcb517
commit
33f3811078
@ -4,10 +4,6 @@ import com.qqchen.deploy.backend.framework.domain.Entity;
|
||||
import jakarta.persistence.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.hibernate.annotations.OnDelete;
|
||||
import org.hibernate.annotations.OnDeleteAction;
|
||||
import org.hibernate.annotations.SQLDelete;
|
||||
import org.hibernate.annotations.Where;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -59,12 +55,6 @@ public class ProjectGroup extends Entity<Long> {
|
||||
/**
|
||||
* 关联的环境列表
|
||||
*/
|
||||
// @ManyToMany(cascade = CascadeType.REMOVE)
|
||||
// @JoinTable(
|
||||
// name = "deploy_project_group_environment",
|
||||
// joinColumns = @JoinColumn(name = "project_group_id"),
|
||||
// inverseJoinColumns = @JoinColumn(name = "environment_id")
|
||||
// )
|
||||
@ManyToMany
|
||||
@JoinTable(
|
||||
name = "deploy_project_group_environment",
|
||||
@ -72,4 +62,5 @@ public class ProjectGroup extends Entity<Long> {
|
||||
inverseJoinColumns = @JoinColumn(name = "environment_id")
|
||||
)
|
||||
private List<Environment> environments;
|
||||
|
||||
}
|
||||
@ -131,8 +131,8 @@ public abstract class BaseServiceImpl<T extends Entity<ID>, D extends BaseDTO, I
|
||||
protected void handleSoftDelete(BooleanBuilder builder, BaseQuery query) {
|
||||
if (query == null || query.getDeleted() == null) {
|
||||
Class<T> entityClass = getEntityClass();
|
||||
LogicDelete softDelete = entityClass.getAnnotation(LogicDelete.class);
|
||||
if (softDelete != null && softDelete.value()) {
|
||||
LogicDelete logicDelete = entityClass.getAnnotation(LogicDelete.class);
|
||||
if (logicDelete != null && logicDelete.value()) {
|
||||
Path<?> deletedPath = EntityPathResolver.getPath(entityPath, "deleted");
|
||||
if (deletedPath instanceof BooleanPath) {
|
||||
builder.and(((BooleanPath) deletedPath).eq(false));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user