TASK:mannequin;
This commit is contained in:
@@ -167,6 +167,10 @@ public class LibraryServiceImpl extends ServiceImpl<LibraryMapper, Library> impl
|
||||
queryWrapper.like("name", query.getPictureName());
|
||||
}
|
||||
|
||||
if (!StringUtils.isEmpty(query.getAgeGroup())) {
|
||||
queryWrapper.eq("level3_type", query.getAgeGroup());
|
||||
}
|
||||
|
||||
if (query.getBrandId() != null) {
|
||||
QueryWrapper<BrandRelLibrary> qw = new QueryWrapper<>();
|
||||
qw.lambda().eq(BrandRelLibrary::getBrandId, query.getBrandId());
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.ai.da.service.impl;
|
||||
|
||||
import com.ai.da.common.config.exception.BusinessException;
|
||||
import com.ai.da.common.context.UserContext;
|
||||
import com.ai.da.common.enums.CollectionLevel1TypeEnum;
|
||||
import com.ai.da.common.enums.LibraryLevel1TypeEnum;
|
||||
import com.ai.da.common.response.PageBaseResponse;
|
||||
import com.ai.da.common.response.ResultEnum;
|
||||
@@ -84,6 +85,10 @@ public class WorkspaceServiceImpl extends ServiceImpl<WorkspaceMapper, Workspace
|
||||
@Resource
|
||||
private WorkspaceService workspaceService;
|
||||
|
||||
@Resource
|
||||
private CollectionElementMapper collectionElementMapper;
|
||||
@Resource
|
||||
private CollectionElementRelModelMapper collectionElementRelModelMapper;
|
||||
|
||||
@Override
|
||||
public IPage<WorkspaceVO> selectWorkspacePage(IPage<WorkspaceVO> page, WorkspaceVO workspace) {
|
||||
@@ -755,7 +760,21 @@ public class WorkspaceServiceImpl extends ServiceImpl<WorkspaceMapper, Workspace
|
||||
|
||||
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(), projectDTO.getWorkspace().getAgeGroup());
|
||||
|
||||
CollectionElement collectionElement = new CollectionElement();
|
||||
collectionElement.setAccountId(userInfo.getId());
|
||||
collectionElement.setProjectId(project.getId());
|
||||
collectionElement.setLevel1Type(CollectionLevel1TypeEnum.MODEL.getRealName());
|
||||
collectionElement.setName(sysFile.getName());
|
||||
collectionElement.setUrl(sysFile.getUrl());
|
||||
collectionElement.setMd5(sysFile.getMd5());
|
||||
collectionElement.setCreateDate(new Date());
|
||||
collectionElement.setHasPin((byte) 0);
|
||||
collectionElementMapper.insert(collectionElement);
|
||||
CollectionElementRelModel collectionElementRelModel = new CollectionElementRelModel();
|
||||
collectionElementRelModel.setCollectionElementId(collectionElement.getId());
|
||||
collectionElementRelModel.setRelationId(sysFile.getId());
|
||||
collectionElementRelModel.setRelationType("System");
|
||||
collectionElementRelModelMapper.insert(collectionElementRelModel);
|
||||
if (projectDTO.getWorkspace().getSex().equals(Sex.FEMALE.getValue())) {
|
||||
workspace.setMannequinFemaleId(sysFile.getId());
|
||||
workspace.setMannequinFemaleType("System");
|
||||
|
||||
Reference in New Issue
Block a user