TASK:模块化;
This commit is contained in:
@@ -502,22 +502,25 @@ public class PortfolioServiceImpl extends ServiceImpl<PortfolioMapper, Portfolio
|
||||
Portfolio portfolio = portfolioMapper.selectById(portfolioDTO.getId());
|
||||
PortfolioVO vo = CopyUtil.copyObject(portfolio, PortfolioVO.class);
|
||||
if (vo.getOpenSource() == 1) {
|
||||
Long collectionId = portfolio.getCollectionId();
|
||||
List<CollectionElement> collectionElementList = collectionElementService.getByCollectionId(collectionId);
|
||||
for (CollectionElement element : collectionElementList) {
|
||||
if (StringUtils.isEmpty(element.getUrl())) {
|
||||
continue;
|
||||
if (!StringUtils.isEmpty(portfolio.getSnapshot())) {
|
||||
ProjectSnapshot projectSnapshot = JSONObject.parseObject(portfolio.getSnapshot(), ProjectSnapshot.class);
|
||||
List<CollectionElement> collectionElementList = projectSnapshot.getCollectionElementList();
|
||||
for (CollectionElement element : collectionElementList) {
|
||||
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());
|
||||
vo.setCanvasUrl(minioUtil.getPreSignedUrl(canvas.getUrl(), 24 * 60));
|
||||
|
||||
Reference in New Issue
Block a user