TASK:模块化;
This commit is contained in:
@@ -1140,8 +1140,8 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
|
||||
String url = library.getUrl();
|
||||
String gender = library.getLevel2Type();
|
||||
|
||||
// 提取sketch TODO
|
||||
|
||||
// 提取sketch
|
||||
JSONObject sketchList = pythonService.segProduct(url);
|
||||
String clothCategory = pythonService.getClothCategory(url, gender);
|
||||
JSONObject attributeRecognition = pythonService.getAttributeRecognition(url, clothCategory, gender);
|
||||
JSONObject data = attributeRecognition.getJSONObject("data");
|
||||
|
||||
@@ -367,10 +367,15 @@ public class WorkspaceServiceImpl extends ServiceImpl<WorkspaceMapper, Workspace
|
||||
vo.setMalePresignedUrl(minioUtil.getPreSignedUrl(libraryMapper.selectById(vo.getMannequinMaleId()).getUrl(), 24 * 60));
|
||||
}
|
||||
}
|
||||
Sex sex = Sex.getSex(vo.getSex());
|
||||
Position position = Position.getPosition(vo.getPosition());
|
||||
vo.setSexEnum(new BizJson(sex.getValue(), sex.name(), BusinessException.getMessageFromResource(sex.name())));
|
||||
vo.setPositionEnum(new BizJson(position.getValue(), position.name(), BusinessException.getMessageFromResource(position.name())));
|
||||
if (!StringUtils.isEmpty(vo.getSex())) {
|
||||
Sex sex = Sex.getSex(vo.getSex());
|
||||
vo.setSexEnum(new BizJson(sex.getValue(), sex.name(), BusinessException.getMessageFromResource(sex.name())));
|
||||
|
||||
}
|
||||
if (!StringUtils.isEmpty(vo.getPosition())) {
|
||||
Position position = Position.getPosition(vo.getPosition());
|
||||
vo.setPositionEnum(new BizJson(position.getValue(), position.name(), BusinessException.getMessageFromResource(position.name())));
|
||||
}
|
||||
QueryWrapper<WorkspaceRelStyle> qw = new QueryWrapper<>();
|
||||
qw.lambda().eq(WorkspaceRelStyle::getWorkspaceId, vo.getId());
|
||||
List<WorkspaceRelStyle> workspaceRelStyles = workspaceRelStyleMapper.selectList(qw);
|
||||
@@ -698,7 +703,8 @@ public class WorkspaceServiceImpl extends ServiceImpl<WorkspaceMapper, Workspace
|
||||
workspaceRelStyleMapper.deleteBatchIds(workspaceRelStyles);
|
||||
}
|
||||
}
|
||||
WorkspaceVO byIdForProject = workspaceService.getByIdForProject(projectId);
|
||||
Long workspaceId = workspaceService.getByProjectId(projectId);
|
||||
WorkspaceVO byIdForProject = workspaceService.getByIdForProject(workspaceId);
|
||||
vo.setId(projectId);
|
||||
vo.setWorkspaceVO(byIdForProject);
|
||||
return vo;
|
||||
@@ -717,7 +723,7 @@ public class WorkspaceServiceImpl extends ServiceImpl<WorkspaceMapper, Workspace
|
||||
workspace.setCreateTime(LocalDateTime.now());
|
||||
workspace.setUpdateTime(LocalDateTime.now());
|
||||
|
||||
if (projectDTO.getProcess().equals(DesignProcess.SERIES_DESIGN.name())) {
|
||||
if (projectDTO.getProcess().equals(DesignProcess.SERIES_DESIGN.name()) || projectDTO.getProcess().equals(DesignProcess.SKETCH_COLLAGE_PROCESS.name())) {
|
||||
SysFile sysFile = sysFileService.getOneBySex(projectDTO.getStyleId(), projectDTO.getWorkspace().getSex());
|
||||
|
||||
if (projectDTO.getWorkspace().getSex().equals(Sex.FEMALE.getValue())) {
|
||||
@@ -737,7 +743,7 @@ public class WorkspaceServiceImpl extends ServiceImpl<WorkspaceMapper, Workspace
|
||||
rel.setStyleId(projectDTO.getStyleId());
|
||||
workspaceRelStyleMapper.insert(rel);
|
||||
}
|
||||
WorkspaceVO byIdForProject = workspaceService.getByIdForProject(project.getId());
|
||||
WorkspaceVO byIdForProject = workspaceService.getByIdForProject(workspace.getId());
|
||||
vo.setId(project.getId());
|
||||
vo.setWorkspaceVO(byIdForProject);
|
||||
return vo;
|
||||
|
||||
Reference in New Issue
Block a user