Browse Source

check productid is null in findByIds

xuchaolang 6 years ago
parent
commit
150e531e17

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

@@ -248,6 +248,10 @@ public class ItemService {
                 continue;
             }
             List<Goods> tmpList = goodsMap.get(productId);
+            if (null == tmpList){
+                log.error("productId not Found in goodsMap, pid={}", productId);
+                continue;
+            }
             tmpList.sort(new Comparator<Goods>() {
                 @Override
                 public int compare(Goods o1, Goods o2) {