‘linchangsheng’ il y a 1 semaine
Parent
commit
7e3b3d4fd7

+ 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));