TASK:模块化;

This commit is contained in:
shahaibo
2025-03-25 10:51:16 +08:00
parent ae484c9e6c
commit d080fc04bb
4 changed files with 25 additions and 4 deletions

View File

@@ -1806,7 +1806,23 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
}
@Override
public LibraryModelPoint getMannequinDetail(MannequinDTO mannequinDTO) {
public QueryLibraryPageVO getMannequinDetail(MannequinDTO mannequinDTO) {
QueryLibraryPageVO vo = new QueryLibraryPageVO();
if (mannequinDTO.getType().equals("System")) {
SysFile sysFile = sysFileMapper.selectById(mannequinDTO.getId());
vo.setDesignType("System");
vo.setLevel1Type(sysFile.getLevel1Type());
vo.setLevel2Type(sysFile.getLevel2Type());
vo.setName(sysFile.getName());
vo.setMinIOPath(minioUtil.getPreSignedUrl(sysFile.getUrl(), 24 * 60));
}else {
Library library = libraryMapper.selectById(mannequinDTO.getId());
vo.setDesignType("Library");
vo.setLevel1Type(library.getLevel1Type());
vo.setLevel2Type(library.getLevel2Type());
vo.setName(library.getName());
vo.setMinIOPath(minioUtil.getPreSignedUrl(library.getUrl(), 24 * 60));
}
QueryWrapper<LibraryModelPoint> qw = new QueryWrapper<>();
qw.lambda().eq(LibraryModelPoint::getRelationId, mannequinDTO.getId());
qw.lambda().eq(LibraryModelPoint::getModelType, mannequinDTO.getType());
@@ -1814,7 +1830,11 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
if (CollectionUtil.isEmpty(libraryModelPoints)) {
throw new BusinessException("No model doting information available.");
}
return libraryModelPoints.get(0);
LibraryModelPoint libraryModelPoint = libraryModelPoints.get(0);
LibraryModelPointVO libraryModelPointVO = CopyUtil.copyObject(libraryModelPoint, LibraryModelPointVO.class);
libraryModelPointVO.setTemplateId(libraryModelPoint.getId());
vo.setLibraryModelPoint(libraryModelPointVO);
return vo;
}
@Override