Browse Source

修改查询用户信息接口

gaohp 1 year ago
parent
commit
05dab19fcc

+ 9 - 4
feifan-module-distri/feifan-module-distri-biz/src/main/java/cn/newfeifan/mall/module/distri/service/duser/DuserServiceImpl.java

@@ -120,7 +120,7 @@ public class DuserServiceImpl implements DuserService {
 
         List<Long> sonsId = sharePathService.sonsId(userId);
         IntegralDO integral = integralService.getIntegral(userId);
-        if (integral == null){
+        if (integral == null) {
             // 初始化积分表
             throw exception(INTEGRAL_NOT_EXISTS);
         }
@@ -128,9 +128,14 @@ public class DuserServiceImpl implements DuserService {
                 .integralDO(integral)
                 .descNo(sonsId.size());
 
-        // 获取昨日贡献值 + 合赢奖
-        String yesterday = ptProfitLogService.getYesterdayLog(sonsId);
-        String totalLog = ptProfitLogService.getTotalLog(sonsId);
+        String yesterday = "0";
+        String totalLog = "0";
+        if (!sonsId.isEmpty()) {
+            // 获取昨日贡献值 + 合赢奖
+            yesterday = ptProfitLogService.getYesterdayLog(sonsId);
+            totalLog = ptProfitLogService.getTotalLog(sonsId);
+        }
+
         return duserInfoVOBuilder.descPrice(Integer.parseInt(yesterday))
                 .descTotalPrice(Integer.parseInt(totalLog)).build();