From c4a42b03f62ad505be0cbedaa8abeff0b26bc8b1 Mon Sep 17 00:00:00 2001 From: xupei Date: Tue, 2 Sep 2025 22:28:33 +0800 Subject: [PATCH] =?UTF-8?q?BUGFIX:=E5=8F=91=E5=B8=83=E4=BD=9C=E5=93=81?= =?UTF-8?q?=E4=B8=AD=E6=B2=A1=E6=9C=89like=E7=9A=84=E8=A1=A3=E6=9C=8D?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E6=9F=A5=E7=9C=8B=E4=BD=9C=E5=93=81=E8=AF=A6?= =?UTF-8?q?=E7=BB=86=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/da/service/impl/PortfolioServiceImpl.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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());