|
@@ -11,7 +11,6 @@ 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.dal.mysql.user.MemberUserMapper;
|
|
|
import cn.newfeifan.mall.module.member.service.user.MemberUserService;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
@@ -49,9 +48,6 @@ public class DuserServiceImpl implements DuserService {
|
|
|
@Resource
|
|
|
private SharePathMapper sharePathMapper;
|
|
|
|
|
|
- @Resource
|
|
|
- private MemberUserMapper memberUserMapper;
|
|
|
-
|
|
|
@Resource
|
|
|
private SharePathService sharePathService;
|
|
|
|
|
@@ -98,20 +94,20 @@ public class DuserServiceImpl implements DuserService {
|
|
|
|
|
|
@Override
|
|
|
public DuserDO getDuserByUser(Long id) {
|
|
|
- return duserMapper.selectOne(new LambdaQueryWrapperX<DuserDO>().eq(DuserDO::getUserId,id));
|
|
|
+ return duserMapper.selectOne(new LambdaQueryWrapperX<DuserDO>().eq(DuserDO::getUserId, id));
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public List<DuserDO> getDuserByName(String name) {
|
|
|
return duserMapper.selectList(new LambdaQueryWrapperX<DuserDO>()
|
|
|
- .eq(DuserDO::getName,name)
|
|
|
+ .eq(DuserDO::getName, name)
|
|
|
);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
public DuserDO getDuserByMobile(String mobile) {
|
|
|
return duserMapper.selectOne(new LambdaQueryWrapperX<DuserDO>()
|
|
|
- .eq(DuserDO::getMobile,mobile)
|
|
|
+ .eq(DuserDO::getMobile, mobile)
|
|
|
);
|
|
|
}
|
|
|
|
|
@@ -160,7 +156,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);
|
|
|
}
|
|
|
DuserInfoVO.DuserInfoVOBuilder duserInfoVOBuilder = DuserInfoVO.builder()
|
|
@@ -215,12 +211,17 @@ public class DuserServiceImpl implements DuserService {
|
|
|
for (DuserRespVO duserRespVO : list) {
|
|
|
duserRespVO.setDescendantCount(sharePathMapper.selectCount(new LambdaQueryWrapperX<SharePathDO>()
|
|
|
.eq(SharePathDO::getAncestor, duserRespVO.getUserId())
|
|
|
- .eq(SharePathDO::getDepth,1)
|
|
|
+ .eq(SharePathDO::getDepth, 1)
|
|
|
));
|
|
|
duserRespVO.setChildrenCount(sharePathMapper.selectCount(new LambdaQueryWrapperX<SharePathDO>()
|
|
|
.eq(SharePathDO::getAncestor, duserRespVO.getUserId())
|
|
|
- .ne(SharePathDO::getDepth,1)
|
|
|
));
|
|
|
+
|
|
|
+ SharePathDO sharePathDO = sharePathMapper.selectOne(new LambdaQueryWrapperX<SharePathDO>()
|
|
|
+ .eq(SharePathDO::getDescendant, duserRespVO.getUserId())
|
|
|
+ .eq(SharePathDO::getDepth, 1)
|
|
|
+ );
|
|
|
+ duserRespVO.setAncNickName(sharePathDO != null ? sharePathDO.getAncNickName() : "");
|
|
|
}
|
|
|
}
|
|
|
}
|