diff --git a/src/main/java/com/ai/da/service/impl/PortfolioServiceImpl.java b/src/main/java/com/ai/da/service/impl/PortfolioServiceImpl.java index a4cc86b0..b635ac16 100644 --- a/src/main/java/com/ai/da/service/impl/PortfolioServiceImpl.java +++ b/src/main/java/com/ai/da/service/impl/PortfolioServiceImpl.java @@ -540,13 +540,15 @@ public class PortfolioServiceImpl extends ServiceImpl userLikeList = projectSnapshot.getUserLikeList(); - List list = new ArrayList<>(); - for (UserLikeSnapshot userLikeSnapshot : userLikeList) { - TDesignPythonOutfit designPythonOutfit = userLikeSnapshot.getDesignPythonOutfit(); - designPythonOutfit.setDesignUrl(minioUtil.getPreSignedUrl(designPythonOutfit.getDesignUrl(), 24 * 60)); - list.add(designPythonOutfit); + if (userLikeList != null && !userLikeList.isEmpty()){ + List 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.setDesignPythonOutfitList(list); } } Canvas canvas = canvasMapper.selectById(vo.getCanvasId());