|
@@ -334,7 +334,7 @@ public class PartnerServiceImpl extends ServiceImpl<PartnerMapper, Partner> impl
|
|
|
partnerQuery.eq("mobile",roleBinding.getMobile());
|
|
|
Partner partner=partnerMapper.selectOne(partnerQuery);
|
|
|
if(StringUtils.isNotBlank(roleBinding.getSuperiorPartnerID())){
|
|
|
- Partner supPartner=partnerMapper.selectById(roleBinding.getSuperiorPartnerID());
|
|
|
+ Partner supPartner=partnerMapper.selectById(roleBinding.getSuperiorPartnerID().toLowerCase());
|
|
|
if(supPartner==null)
|
|
|
return ResultUtil.createFail("该上级合伙人已经失效");
|
|
|
if(supPartner.getPartnerType().equals(1))
|
|
@@ -359,7 +359,7 @@ public class PartnerServiceImpl extends ServiceImpl<PartnerMapper, Partner> impl
|
|
|
partner.setPartnerHeadImg(userAccount.getHeadimg());
|
|
|
partner.setPartnerName(userAccount.getNickname());
|
|
|
if(StringUtils.isNotBlank(roleBinding.getSuperiorPartnerID())){
|
|
|
- Partner superpartner = partnerMapper.selectById(roleBinding.getSuperiorPartnerID());
|
|
|
+ Partner superpartner = partnerMapper.selectById(roleBinding.getSuperiorPartnerID().toLowerCase());
|
|
|
if(superpartner!=null)
|
|
|
partner.setRegion(superpartner.getRegion());
|
|
|
}
|
|
@@ -371,7 +371,7 @@ public class PartnerServiceImpl extends ServiceImpl<PartnerMapper, Partner> impl
|
|
|
recQuery.eq("status",1);
|
|
|
int reci = partnerRecommendService.count(recQuery);
|
|
|
if(reci == 0 ) {
|
|
|
- PartnerRecommend partnerRecommend = new PartnerRecommend(partner.getId(), roleBinding.getSuperiorPartnerID(), 1);
|
|
|
+ PartnerRecommend partnerRecommend = new PartnerRecommend(partner.getId(), roleBinding.getSuperiorPartnerID().toLowerCase(), 1);
|
|
|
partnerRecommendService.insertOne(partnerRecommend);
|
|
|
}
|
|
|
}
|
|
@@ -385,13 +385,12 @@ public class PartnerServiceImpl extends ServiceImpl<PartnerMapper, Partner> impl
|
|
|
userRoleService.addUserRole(userAccount,userAccount.getNickname(),userAccount.getHeadimg(),partner.getId(),2,partner.getPartnerStatus()); //修改userRole
|
|
|
|
|
|
if(StringUtils.isNotBlank(roleBinding.getSuperiorPartnerID())){
|
|
|
-
|
|
|
QueryWrapper<PartnerRecommend> recQuery=new QueryWrapper<>();
|
|
|
recQuery.eq("subordinate_id",partner.getId());
|
|
|
recQuery.eq("status",1);
|
|
|
int reci = partnerRecommendService.count(recQuery);
|
|
|
if(reci == 0 ) {
|
|
|
- PartnerRecommend partnerRecommend = new PartnerRecommend(partner.getId(), roleBinding.getSuperiorPartnerID(), 1);
|
|
|
+ PartnerRecommend partnerRecommend = new PartnerRecommend(partner.getId(), roleBinding.getSuperiorPartnerID().toLowerCase(), 1);
|
|
|
partnerRecommendService.insertOne(partnerRecommend);
|
|
|
}
|
|
|
}
|