| 
					
				 | 
			
			
				@@ -5,6 +5,8 @@ import cn.newfeifan.mall.module.distri.controller.admin.integral.vo.IntegralSave 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.newfeifan.mall.module.distri.controller.admin.sharepath.vo.SharePathSaveReqVO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.newfeifan.mall.module.distri.dal.dataobject.integral.IntegralDO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.newfeifan.mall.module.distri.service.integral.IntegralService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import cn.newfeifan.mall.module.distri.service.ptprofitlog.PtProfitLogService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import cn.newfeifan.mall.module.distri.service.sharepath.SharePathService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.newfeifan.mall.module.distri.service.socialstatus.SocialStatusService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.newfeifan.mall.module.member.dal.dataobject.user.MemberUserDO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.newfeifan.mall.module.member.service.user.MemberUserService; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -21,6 +23,8 @@ import cn.newfeifan.mall.framework.common.util.object.BeanUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.newfeifan.mall.module.distri.dal.mysql.duser.DuserMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import java.util.List; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import static cn.newfeifan.mall.framework.common.exception.util.ServiceExceptionUtil.exception; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import static cn.newfeifan.mall.module.distri.enums.ErrorCodeConstants.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -39,6 +43,11 @@ public class DuserServiceImpl implements DuserService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Resource 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private MemberUserService memberUserService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Resource 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private SharePathService sharePathService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Resource 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private PtProfitLogService ptProfitLogService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public Long createDuser(DuserSaveReqVO createReqVO) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -94,6 +103,26 @@ public class DuserServiceImpl implements DuserService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         checkAndCreat(saveReqVO.getAncestor()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public DuserInfoVO getDuserInfo(Long userId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<Long> sonsId = sharePathService.sonsId(userId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        IntegralDO integral = integralService.getIntegral(userId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (integral == null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            throw exception(INTEGRAL_NOT_EXISTS); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        DuserInfoVO.DuserInfoVOBuilder duserInfoVOBuilder = DuserInfoVO.builder() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                .integralDO(integral) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                .descNo(sonsId.size()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // 获取昨日贡献值 + 合赢奖 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        String yesterday = ptProfitLogService.getYesterdayLog(sonsId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        String totalLog = ptProfitLogService.getTotalLog(sonsId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return duserInfoVOBuilder.descPrice(Integer.parseInt(yesterday)) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                .descTotalPrice(Integer.parseInt(totalLog)).build(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private void checkAndCreat(Long userId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         DuserDO duserDO = duserMapper.selectOne(new LambdaQueryWrapperX<DuserDO>().eqIfPresent(DuserDO::getUserId, userId)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         MemberUserDO user = memberUserService.getUser(userId); 
			 |