plf 3 年 前
コミット
74744ecf51

+ 6 - 6
src/main/java/com/caimei365/user/service/impl/ClubServiceImpl.java

@@ -216,20 +216,20 @@ public class ClubServiceImpl implements ClubService {
         if (club == null) {
             return ResponseJson.error("机构信息不存在", null);
         }
-        Map<String, Object> map = new HashMap<>();
+        Map<String, Object> map = new HashMap<>(10);
         map.put("user", user);
         map.put("club", club);
         OrderCountVo countVo = clubMapper.getOrderCount(userId);
         //待确认数量
-        map.put("confirmedCount", countVo.getConfirmedCount());
+        map.put("confirmedCount", countVo != null ? countVo.getConfirmedCount() : 0);
         //待付款数量
-        map.put("paymentCount", countVo.getPaymentCount());
+        map.put("paymentCount", countVo != null ? countVo.getPaymentCount() : 0);
         //待发货数量
-        map.put("waitShipmentsCount", countVo.getWaitShipmentsCount());
+        map.put("waitShipmentsCount", countVo != null ? countVo.getWaitShipmentsCount() : 0);
         //已发货数量
-        map.put("shipmentsCount", countVo.getShipmentsCount());
+        map.put("shipmentsCount", countVo != null ? countVo.getShipmentsCount() : 0);
         //退货款数量
-        map.put("salesReturnCount", countVo.getSalesReturnCount());
+        map.put("salesReturnCount", countVo != null ? countVo.getSalesReturnCount() : 0);
         //联系电话
         String contactNumber = baseMapper.getAfterSalesPhone();
         map.put("contactNumber", contactNumber);