‘linchangsheng’ 1 week ago
parent
commit
7e3b3d4fd7
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/main/java/com/gree/mall/manager/logic/goods/GoodsLogic.java

+ 2 - 0
src/main/java/com/gree/mall/manager/logic/goods/GoodsLogic.java

@@ -787,6 +787,8 @@ public class GoodsLogic {
         List<String> companyWechatIds = adminUser.getAdminCompanyIds();
 
         GoodsTypeCount goodsTypeCount = customGoodsMapper.countByType(companyWechatIds);
+        if (goodsTypeCount == null)
+            return new GoodsTypeCount();
         //查询已售罄的商品数量
         goodsTypeCount.setYsq(customGoodsMapper.ysq(companyWechatIds));
         goodsTypeCount.setHdz(customGoodsMapper.countByFlag(companyWechatIds));