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

@@ -87,7 +87,7 @@ public class ProjectController {
@PostMapping("/getMannequinDetail")
@ApiOperationSupport(order = 7)
@ApiOperation(value = "获取模特详情", notes = "传入mannequinId")
public Response<LibraryModelPoint> getMannequinDetail(@Valid @RequestBody MannequinDTO mannequinDTO) {
public Response<QueryLibraryPageVO> getMannequinDetail(@Valid @RequestBody MannequinDTO mannequinDTO) {
return Response.success(userLikeGroupService.getMannequinDetail(mannequinDTO));
}
}

View File

@@ -10,4 +10,5 @@ import lombok.NoArgsConstructor;
public class MannequinDTO {
private Long id;
private String type;
// private String modelType;
}

View File

@@ -79,7 +79,7 @@ public interface UserLikeGroupService extends IService<UserLikeGroup> {
ModuleChooseVO saveModuleContent(ModuleSaveDTO moduleSaveDTO);
LibraryModelPoint getMannequinDetail(MannequinDTO mannequinDTO);
QueryLibraryPageVO getMannequinDetail(MannequinDTO mannequinDTO);
String brandLogoUpload(MultipartFile file);

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