Sfoglia il codice sorgente

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

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