|
|
@@ -120,7 +120,7 @@ public class ExpertManage { |
|
|
|
// 增加用户专家角色 |
|
|
|
Role expertRole = iRoleService.getOne(Wrappers.lambdaQuery(Role.class).eq(Role::getCode, RoleEnum.EXPERT.name())); |
|
|
|
UserRole expertUserRole = iUserRoleService.getOne(Wrappers.lambdaQuery(UserRole.class) |
|
|
|
.eq(UserRole::getRoleId, expertRole.getId()).eq(UserRole::getUserId,userId)); |
|
|
|
.eq(UserRole::getRoleId, expertRole.getId()).eq(UserRole::getUserId, userId)); |
|
|
|
if (Objects.isNull(expertUserRole)) { |
|
|
|
expertUserRole = new UserRole(); |
|
|
|
expertUserRole.setUserId(userId); |
|
|
@@ -195,6 +195,11 @@ public class ExpertManage { |
|
|
|
.build(); |
|
|
|
iUserInfoService.save(userInfo); |
|
|
|
} |
|
|
|
ExpertUserFullInfo one = iExpertUserFullInfoService.getOne(Wrappers.lambdaQuery(ExpertUserFullInfo.class) |
|
|
|
.eq(ExpertUserFullInfo::getPhoneNo, phoneNo)); |
|
|
|
if (Objects.nonNull(one)) { |
|
|
|
throw new BizException("该手机号已被专家注册,请确认后再填写"); |
|
|
|
} |
|
|
|
return userInfo.getId(); |
|
|
|
} |
|
|
|
} |