فهرست منبع

Bug Fix, check supportIdList if empty before execute supportRepository.find

xuchaolang 6 سال پیش
والد
کامیت
05b1012be8
1فایلهای تغییر یافته به همراه4 افزوده شده و 0 حذف شده
  1. 4 0
      rankin-product-service/src/main/java/cn/rankin/productservice/service/SupportService.java

+ 4 - 0
rankin-product-service/src/main/java/cn/rankin/productservice/service/SupportService.java

@@ -138,6 +138,10 @@ public class SupportService {
             supportIdList.add(relation.getTid());
         });
 
+        if (supportIdList.isEmpty()){
+            return new ArrayList<>();
+        }
+
         List<Support> supportList = supportRepository.findByIds(supportIdList, BaseStatusEnum.NORMAL);
 
         return supportList;