TASK:AiDA模块化
This commit is contained in:
@@ -28,6 +28,8 @@ public class ModuleChooseVO {
|
||||
private List<ToProductImageResultVO> relight;
|
||||
|
||||
private CavasModuleChooseVO canvas;
|
||||
|
||||
private List<CollectionSketchVO> boundingBox;
|
||||
// private moodBoardModuleChooseVO poseTransfer;
|
||||
// private moodBoardModuleChooseVO patternMaking3D;
|
||||
// private moodBoardModuleChooseVO deReconstruction;
|
||||
|
||||
@@ -109,6 +109,8 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
|
||||
private PortfolioService portfolioService;
|
||||
@Resource
|
||||
private LibraryModelPointMapper libraryModelPointMapper;
|
||||
@Resource
|
||||
private LibraryService libraryService;
|
||||
|
||||
@Override
|
||||
public void deleteUserGroup(Long userGroupId) {
|
||||
@@ -1485,8 +1487,10 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
|
||||
@Override
|
||||
@Transactional
|
||||
public ModuleChooseVO saveModuleContent(ModuleSaveDTO moduleSaveDTO) {
|
||||
ModuleChooseVO result = new ModuleChooseVO();
|
||||
Long accountId = UserContext.getUserHolder().getId();
|
||||
Long projectId = moduleSaveDTO.getProjectId();
|
||||
boolean boundingBox = false;
|
||||
if (Objects.nonNull(moduleSaveDTO.getMoodBoard())) {
|
||||
MoodBoardModuleSaveDTO moodBoard = moduleSaveDTO.getMoodBoard();
|
||||
if (moodBoard.getMoodTemplateId() != null) {
|
||||
@@ -1653,6 +1657,7 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
|
||||
}
|
||||
}
|
||||
if (!CollectionUtils.isEmpty(moduleSaveDTO.getSketchBoard())){
|
||||
boundingBox = true;
|
||||
QueryWrapper<CollectionElement> qw = new QueryWrapper<>();
|
||||
qw.lambda().eq(CollectionElement::getProjectId, projectId);
|
||||
qw.lambda().eq(CollectionElement::getLevel1Type, CollectionLevel1TypeEnum.SKETCH_BOARD.getRealName());
|
||||
@@ -1708,7 +1713,28 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
|
||||
collectionElementMapper.deleteBatchIds(old);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
if (boundingBox) {
|
||||
QueryWrapper<CollectionElement> qw = new QueryWrapper<>();
|
||||
qw.lambda().eq(CollectionElement::getLevel1Type, CollectionLevel1TypeEnum.SKETCH_BOARD.getRealName());
|
||||
qw.lambda().eq(CollectionElement::getProjectId, projectId);
|
||||
List<CollectionElement> collectionElements = collectionElementMapper.selectList(qw);
|
||||
|
||||
List<CollectionSketchVO> voList = new ArrayList<>();
|
||||
for (CollectionElement collectionElement : collectionElements) {
|
||||
CollectionSketchVO vo = CopyUtil.copyObject(collectionElement, CollectionSketchVO.class);
|
||||
String url = collectionElement.getUrl();
|
||||
libraryService.processSketchBoards(url, collectionElement.getLevel2Type());
|
||||
if (url.contains(".")) {
|
||||
String[] split = url.split("\\.");
|
||||
vo.setUrlWithWhiteSide(minioUtil.getPreSignedUrl(split[0] + "-show." + split[1], 24 * 60, true));
|
||||
}else {
|
||||
vo.setUrlWithWhiteSide(minioUtil.getPreSignedUrl(url + "-show", 24 * 60, true));
|
||||
}
|
||||
voList.add(vo);
|
||||
}
|
||||
result.setBoundingBox(voList);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user