后台报错
parent
b59f558cb6
commit
e14b6608ef
|
@ -5,6 +5,7 @@ import cn.hutool.core.util.StrUtil;
|
|||
import cn.iocoder.yudao.framework.common.exception.ServiceException;
|
||||
import cn.iocoder.yudao.framework.common.util.validation.ValidationUtils;
|
||||
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import cn.iocoder.yudao.framework.tenant.core.context.TenantContextHolder;
|
||||
import cn.iocoder.yudao.module.member.dal.dataobject.user.MemberUserDO;
|
||||
import cn.iocoder.yudao.module.member.enums.ErrorCodeConstants;
|
||||
import cn.iocoder.yudao.module.member.service.user.MemberUserService;
|
||||
|
@ -71,11 +72,11 @@ public class PromoterServiceImpl implements PromoterService {
|
|||
memberUserDO.setMobile(createReqVO.getMobile());
|
||||
memberUserDO.setStatus(createReqVO.getStatus());
|
||||
memberUserDO.setPassword(createReqVO.getMobile().substring(createReqVO.getMobile().length() - 6));
|
||||
memberUserService.createUserIfAbsent(createReqVO.getMobile(), createReqVO.getNickname(), getClientIP());
|
||||
memberUserDO = memberUserService.createUserIfAbsent(createReqVO.getMobile(), createReqVO.getNickname(), getClientIP());
|
||||
}
|
||||
// 插入
|
||||
PromoterDO promoter = PromoterConvert.INSTANCE.convert(createReqVO);
|
||||
promoter.setTenantId(SecurityFrameworkUtils.getLoginUser().getTenantId());
|
||||
promoter.setTenantId(TenantContextHolder.getTenantId());
|
||||
Long count = promoterMapper.selectCount(Wrappers.lambdaQuery(PromoterDO.class).eq(PromoterDO::getUserId, memberUserDO.getId()));
|
||||
if (count > 0) {
|
||||
throw new ServiceException(PROMOTER_EXISTS);
|
||||
|
|
Loading…
Reference in New Issue