Browse Source

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

xuchaolang 6 years ago
parent
commit
05b1012be8

+ 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());
             supportIdList.add(relation.getTid());
         });
         });
 
 
+        if (supportIdList.isEmpty()){
+            return new ArrayList<>();
+        }
+
         List<Support> supportList = supportRepository.findByIds(supportIdList, BaseStatusEnum.NORMAL);
         List<Support> supportList = supportRepository.findByIds(supportIdList, BaseStatusEnum.NORMAL);
 
 
         return supportList;
         return supportList;