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 jakarta.persistence.*;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
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;
|
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
|
@ManyToMany
|
||||||
@JoinTable(
|
@JoinTable(
|
||||||
name = "deploy_project_group_environment",
|
name = "deploy_project_group_environment",
|
||||||
@ -72,4 +62,5 @@ public class ProjectGroup extends Entity<Long> {
|
|||||||
inverseJoinColumns = @JoinColumn(name = "environment_id")
|
inverseJoinColumns = @JoinColumn(name = "environment_id")
|
||||||
)
|
)
|
||||||
private List<Environment> environments;
|
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) {
|
protected void handleSoftDelete(BooleanBuilder builder, BaseQuery query) {
|
||||||
if (query == null || query.getDeleted() == null) {
|
if (query == null || query.getDeleted() == null) {
|
||||||
Class<T> entityClass = getEntityClass();
|
Class<T> entityClass = getEntityClass();
|
||||||
LogicDelete softDelete = entityClass.getAnnotation(LogicDelete.class);
|
LogicDelete logicDelete = entityClass.getAnnotation(LogicDelete.class);
|
||||||
if (softDelete != null && softDelete.value()) {
|
if (logicDelete != null && logicDelete.value()) {
|
||||||
Path<?> deletedPath = EntityPathResolver.getPath(entityPath, "deleted");
|
Path<?> deletedPath = EntityPathResolver.getPath(entityPath, "deleted");
|
||||||
if (deletedPath instanceof BooleanPath) {
|
if (deletedPath instanceof BooleanPath) {
|
||||||
builder.and(((BooleanPath) deletedPath).eq(false));
|
builder.and(((BooleanPath) deletedPath).eq(false));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user