TASK:cloud;
This commit is contained in:
@@ -34,4 +34,6 @@ public class ProjectQueryDTO extends PageQueryBaseVo {
|
||||
|
||||
@ApiModelProperty("1交集2并集")
|
||||
private Integer intersection;
|
||||
|
||||
private String process;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,12 @@ public enum DesignProcess implements IEnumDisplay {
|
||||
FINISHED_PRODUCT("Finished product"),
|
||||
PRINT_DESIGN("Print design"),
|
||||
SKETCH_COLLAGE_PROCESS("Sketch Collage process"),
|
||||
THREE_D_PLATE_MAKING("3D plate making");
|
||||
THREE_D_PLATE_MAKING("3D plate making"),
|
||||
TO_PRODUCT_IMAGE("To product image"),
|
||||
RELIGHT("Relight"),
|
||||
POSE_TRANSFER("Pose transfer"),
|
||||
CANVAS("Canvas"),
|
||||
;
|
||||
|
||||
private final String value;
|
||||
|
||||
|
||||
@@ -25,4 +25,6 @@ import java.util.Set;
|
||||
public interface ProjectService extends IService<Project> {
|
||||
|
||||
Set<Long> getChildProjectIdSet(Long projectId);
|
||||
|
||||
List<Project> getByProjectNameLike(String projectName);
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ import com.ai.da.mapper.primary.entity.Collection;
|
||||
import com.ai.da.model.dto.*;
|
||||
import com.ai.da.model.enums.BuildType;
|
||||
import com.ai.da.model.enums.CollectionType;
|
||||
import com.ai.da.model.enums.DesignProcess;
|
||||
import com.ai.da.model.vo.*;
|
||||
import com.ai.da.python.PythonService;
|
||||
import com.ai.da.python.vo.*;
|
||||
@@ -1853,6 +1854,18 @@ public class DesignServiceImpl extends ServiceImpl<DesignMapper, Design> impleme
|
||||
String batchTaskId = UUID.randomUUID() + "-" + userHolder.getId();
|
||||
|
||||
Long projectId = cloudTaskDTO.getProjectId();
|
||||
if (null == projectId) {
|
||||
Project project = new Project();
|
||||
project.setName(DesignProcess.TO_PRODUCT_IMAGE.getValue());
|
||||
project.setProcess(DesignProcess.TO_PRODUCT_IMAGE.name());
|
||||
project.setOriginal(1);
|
||||
project.setAccountId(userHolder.getId());
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
project.setCreateTime(now);
|
||||
project.setUpdateTime(now);
|
||||
projectService.save(project);
|
||||
projectId = project.getId();
|
||||
}
|
||||
UserLikeGroup userLikeGroup = userLikeGroupService.getByProjectId(projectId);
|
||||
Long userLikeGroupId = null;
|
||||
ToProductImageRecord toProductImageRecord = new ToProductImageRecord();
|
||||
@@ -2012,6 +2025,18 @@ public class DesignServiceImpl extends ServiceImpl<DesignMapper, Design> impleme
|
||||
AuthPrincipalVo userHolder = UserContext.getUserHolder();
|
||||
String batchTaskId = UUID.randomUUID() + "-" + userHolder.getId();
|
||||
Long projectId = cloudTaskDTO.getProjectId();
|
||||
if (null == projectId) {
|
||||
Project project = new Project();
|
||||
project.setName(DesignProcess.TO_PRODUCT_IMAGE.getValue());
|
||||
project.setProcess(DesignProcess.TO_PRODUCT_IMAGE.name());
|
||||
project.setOriginal(1);
|
||||
project.setAccountId(userHolder.getId());
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
project.setCreateTime(now);
|
||||
project.setUpdateTime(now);
|
||||
projectService.save(project);
|
||||
projectId = project.getId();
|
||||
}
|
||||
UserLikeGroup userLikeGroup = userLikeGroupService.getByProjectId(projectId);
|
||||
Long userLikeGroupId = null;
|
||||
|
||||
|
||||
@@ -65,4 +65,11 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
|
||||
}
|
||||
return new HashSet<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Project> getByProjectNameLike(String projectName) {
|
||||
QueryWrapper<Project> qw = new QueryWrapper<>();
|
||||
qw.lambda().like(Project::getName, projectName);
|
||||
return projectMapper.selectList(qw);
|
||||
}
|
||||
}
|
||||
@@ -1308,7 +1308,7 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
|
||||
QueryWrapper<Project> queryWrapper = new QueryWrapper<>();
|
||||
|
||||
queryWrapper.eq("account_id", authPrincipalVo.getId());
|
||||
queryWrapper.isNull("parent_id");
|
||||
// queryWrapper.isNull("parent_id");
|
||||
if (!StringUtils.isEmpty(query.getProjectName())) {
|
||||
queryWrapper.like("name", query.getProjectName());
|
||||
}
|
||||
@@ -1318,6 +1318,9 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
|
||||
if (Objects.nonNull(query.getEndDate())) {
|
||||
queryWrapper.le("update_time", new Date(query.getEndDate()));
|
||||
}
|
||||
if (!StringUtils.isEmpty(query.getProcess())) {
|
||||
queryWrapper.eq("process", query.getProcess());
|
||||
}
|
||||
// 新增分类过滤
|
||||
if (CollectionUtil.isNotEmpty(query.getClassificationIdList())) {
|
||||
List<Long> projectIdList = new ArrayList<>();
|
||||
|
||||
Reference in New Issue
Block a user