TASK:模块化;
This commit is contained in:
@@ -502,22 +502,25 @@ public class PortfolioServiceImpl extends ServiceImpl<PortfolioMapper, Portfolio
|
|||||||
Portfolio portfolio = portfolioMapper.selectById(portfolioDTO.getId());
|
Portfolio portfolio = portfolioMapper.selectById(portfolioDTO.getId());
|
||||||
PortfolioVO vo = CopyUtil.copyObject(portfolio, PortfolioVO.class);
|
PortfolioVO vo = CopyUtil.copyObject(portfolio, PortfolioVO.class);
|
||||||
if (vo.getOpenSource() == 1) {
|
if (vo.getOpenSource() == 1) {
|
||||||
Long collectionId = portfolio.getCollectionId();
|
if (!StringUtils.isEmpty(portfolio.getSnapshot())) {
|
||||||
List<CollectionElement> collectionElementList = collectionElementService.getByCollectionId(collectionId);
|
ProjectSnapshot projectSnapshot = JSONObject.parseObject(portfolio.getSnapshot(), ProjectSnapshot.class);
|
||||||
for (CollectionElement element : collectionElementList) {
|
List<CollectionElement> collectionElementList = projectSnapshot.getCollectionElementList();
|
||||||
if (StringUtils.isEmpty(element.getUrl())) {
|
for (CollectionElement element : collectionElementList) {
|
||||||
continue;
|
if (StringUtils.isEmpty(element.getUrl())) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
element.setUrl(minioUtil.getPreSignedUrl(element.getUrl(), 24 * 60));
|
||||||
}
|
}
|
||||||
element.setUrl(minioUtil.getPreSignedUrl(element.getUrl(), 24 * 60));
|
vo.setCollectionElementList(collectionElementList);
|
||||||
|
List<UserLikeSnapshot> userLikeList = projectSnapshot.getUserLikeList();
|
||||||
|
List<TDesignPythonOutfit> list = new ArrayList<>();
|
||||||
|
for (UserLikeSnapshot userLikeSnapshot : userLikeList) {
|
||||||
|
TDesignPythonOutfit designPythonOutfit = userLikeSnapshot.getDesignPythonOutfit();
|
||||||
|
designPythonOutfit.setDesignUrl(minioUtil.getPreSignedUrl(designPythonOutfit.getDesignUrl(), 24 * 60));
|
||||||
|
list.add(designPythonOutfit);
|
||||||
|
}
|
||||||
|
vo.setDesignPythonOutfitList(list);
|
||||||
}
|
}
|
||||||
vo.setCollectionElementList(collectionElementList);
|
|
||||||
QueryWrapper<TDesignPythonOutfit> qw = new QueryWrapper<>();
|
|
||||||
qw.lambda().eq(TDesignPythonOutfit::getCollectionId, portfolio.getCollectionId());
|
|
||||||
List<TDesignPythonOutfit> designPythonOutfitList = designPythonOutfitMapper.selectList(qw);
|
|
||||||
for (TDesignPythonOutfit tDesignPythonOutfit : designPythonOutfitList) {
|
|
||||||
tDesignPythonOutfit.setDesignUrl(minioUtil.getPreSignedUrl(tDesignPythonOutfit.getDesignUrl(), 24 * 60));
|
|
||||||
}
|
|
||||||
vo.setDesignPythonOutfitList(designPythonOutfitList);
|
|
||||||
}
|
}
|
||||||
Canvas canvas = canvasMapper.selectById(vo.getCanvasId());
|
Canvas canvas = canvasMapper.selectById(vo.getCanvasId());
|
||||||
vo.setCanvasUrl(minioUtil.getPreSignedUrl(canvas.getUrl(), 24 * 60));
|
vo.setCanvasUrl(minioUtil.getPreSignedUrl(canvas.getUrl(), 24 * 60));
|
||||||
|
|||||||
Reference in New Issue
Block a user