TASK:模块化;

This commit is contained in:
shahaibo
2025-04-21 22:13:53 +08:00
parent 98e1f37c1d
commit dfe99ef080
2 changed files with 25 additions and 15 deletions

View File

@@ -2501,25 +2501,34 @@ public class DesignServiceImpl extends ServiceImpl<DesignMapper, Design> impleme
if (null != collectionId) {
QueryWrapper<TDesignPythonOutfit> qw = new QueryWrapper<>();
qw.lambda().eq(TDesignPythonOutfit::getCollectionId, collectionId);
Page<TDesignPythonOutfit> page = designPythonOutfitMapper.selectPage(new Page<>(query.getPage(), query.getSize()), qw);
IPage<DesignCollectionItemVO> convert = page.convert((Function<TDesignPythonOutfit, DesignCollectionItemVO>) outfit -> {
if (outfit != null) {
DesignCollectionItemVO vo = new DesignCollectionItemVO();
vo.setDesignOutfitId(outfit.getId());
vo.setDesignOutfitUrl(minioUtil.getPreSignedUrl(outfit.getDesignUrl(), 24 * 60));
vo.setDesignItemId(outfit.getDesignItemId());
return vo;
}
return null;
});
result.setDesign(PageBaseResponse.success(convert));
List<TDesignPythonOutfit> list = designPythonOutfitMapper.selectList(qw);
List<DesignCollectionItemVO> voList = new ArrayList<>();
for (TDesignPythonOutfit tDesignPythonOutfit : list) {
DesignCollectionItemVO vo = new DesignCollectionItemVO();
vo.setDesignOutfitId(tDesignPythonOutfit.getId());
vo.setDesignOutfitUrl(minioUtil.getPreSignedUrl(tDesignPythonOutfit.getDesignUrl(), 24 * 60));
vo.setDesignItemId(tDesignPythonOutfit.getDesignItemId());
voList.add(vo);
}
result.setDesign(voList);
// IPage<DesignCollectionItemVO> convert = page.convert((Function<TDesignPythonOutfit, DesignCollectionItemVO>) outfit -> {
// if (outfit != null) {
// DesignCollectionItemVO vo = new DesignCollectionItemVO();
// vo.setDesignOutfitId(outfit.getId());
// vo.setDesignOutfitUrl(minioUtil.getPreSignedUrl(outfit.getDesignUrl(), 24 * 60));
// vo.setDesignItemId(outfit.getDesignItemId());
// return vo;
// }
// return null;
// });
// result.setDesign(PageBaseResponse.success(convert));
return result;
}else {
result.setDesign(PageBaseResponse.success(new Page<>()));
result.setDesign(new ArrayList<>());
return result;
}
}
result.setDesign(PageBaseResponse.success(new Page<>()));
result.setDesign(new ArrayList<>());
return result;
} else if (query.getBuildType().equals(BuildType.TO_PRODUCT_IMAGE.getValue())) {
List<MagicToolResultVO> results = new ArrayList<>();