Răsfoiți Sursa

推荐图片为空修复

zhangchen 1 săptămână în urmă
părinte
comite
ae1706d5f3

+ 2 - 0
alien-store/src/main/java/shop/alien/store/service/impl/BathFacilityServiceServiceImpl.java

@@ -196,6 +196,8 @@ public class BathFacilityServiceServiceImpl extends ServiceImpl<BathFacilityServ
         if (!CollectionUtils.isEmpty(imageList)) {
             vo.setImageList(imageList.stream().map(StoreImg::getImgUrl)
                     .collect(Collectors.toList()));
+        } else {
+            vo.setImageList(new ArrayList<>());
         }
         return vo;
     }

+ 2 - 0
alien-store/src/main/java/shop/alien/store/service/impl/SportsEquipmentFacilityServiceImpl.java

@@ -178,6 +178,8 @@ public class SportsEquipmentFacilityServiceImpl extends ServiceImpl<SportsEquipm
             if (!CollectionUtils.isEmpty(imageList)) {
                 categoryVo.setImageList(imageList.stream().map(StoreImg::getImgUrl)
                         .collect(Collectors.toList()));
+            } else {
+                categoryVo.setImageList(new ArrayList<>());
             }
             
             result.add(categoryVo);