fix:扫物业码和后台注册推广员的时候 user表的中推广员id默认为自己

feature/mall_product
tangqian 2023-06-15 17:43:08 +08:00
parent 8d6bfcdcdd
commit 538daff555
1 changed files with 7 additions and 0 deletions

View File

@ -89,11 +89,14 @@ public class PromoterServiceImpl implements PromoterService {
promoter.setUserId(memberUserDO.getId());
promoter.setCreateTime(LocalDateTime.now());
promoterMapper.insert(promoter);
memberUserDO.setPromoterId(memberUserDO.getId());
memberUserService.updateById(memberUserDO);
// 返回
return promoter.getId();
}
@Override
@Transactional
public Long appCreatePromoter(AppPromoterCreateReqVO createReqVO) {
//判断手机号是否注册
MemberUserDO memberUserDO = memberUserService.getUserByMobile(createReqVO.getMobile());
@ -127,6 +130,8 @@ public class PromoterServiceImpl implements PromoterService {
promoter.setCreateTime(LocalDateTime.now());
promoter.setSourceType(createReqVO.getSourceType());
promoterMapper.insert(promoter);
memberUserDO.setPromoterId(memberUserDO.getId());
memberUserService.updateById(memberUserDO);
// 返回
return promoter.getId();
}
@ -278,6 +283,8 @@ public class PromoterServiceImpl implements PromoterService {
}
promoter.setDeptId(deptRespDTO.getId());
promoterMapper.insert(promoter);
memberUserDO.setPromoterId(memberUserDO.getId());
memberUserService.updateById(memberUserDO);
respVO.getCreateUsernames().add(importUser.getNickName());
return;
});