TASK:模块化;
This commit is contained in:
@@ -87,7 +87,7 @@ public class ProjectController {
|
|||||||
@PostMapping("/getMannequinDetail")
|
@PostMapping("/getMannequinDetail")
|
||||||
@ApiOperationSupport(order = 7)
|
@ApiOperationSupport(order = 7)
|
||||||
@ApiOperation(value = "获取模特详情", notes = "传入mannequinId")
|
@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));
|
return Response.success(userLikeGroupService.getMannequinDetail(mannequinDTO));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,4 +10,5 @@ import lombok.NoArgsConstructor;
|
|||||||
public class MannequinDTO {
|
public class MannequinDTO {
|
||||||
private Long id;
|
private Long id;
|
||||||
private String type;
|
private String type;
|
||||||
|
// private String modelType;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ public interface UserLikeGroupService extends IService<UserLikeGroup> {
|
|||||||
|
|
||||||
ModuleChooseVO saveModuleContent(ModuleSaveDTO moduleSaveDTO);
|
ModuleChooseVO saveModuleContent(ModuleSaveDTO moduleSaveDTO);
|
||||||
|
|
||||||
LibraryModelPoint getMannequinDetail(MannequinDTO mannequinDTO);
|
QueryLibraryPageVO getMannequinDetail(MannequinDTO mannequinDTO);
|
||||||
|
|
||||||
String brandLogoUpload(MultipartFile file);
|
String brandLogoUpload(MultipartFile file);
|
||||||
|
|
||||||
|
|||||||
@@ -1806,7 +1806,23 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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<>();
|
QueryWrapper<LibraryModelPoint> qw = new QueryWrapper<>();
|
||||||
qw.lambda().eq(LibraryModelPoint::getRelationId, mannequinDTO.getId());
|
qw.lambda().eq(LibraryModelPoint::getRelationId, mannequinDTO.getId());
|
||||||
qw.lambda().eq(LibraryModelPoint::getModelType, mannequinDTO.getType());
|
qw.lambda().eq(LibraryModelPoint::getModelType, mannequinDTO.getType());
|
||||||
@@ -1814,7 +1830,11 @@ public class UserLikeGroupServiceImpl extends ServiceImpl<UserLikeGroupMapper, U
|
|||||||
if (CollectionUtil.isEmpty(libraryModelPoints)) {
|
if (CollectionUtil.isEmpty(libraryModelPoints)) {
|
||||||
throw new BusinessException("No model doting information available.");
|
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
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user