|
|
@@ -119,7 +119,8 @@ 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())); |
|
|
|
UserRole expertUserRole = iUserRoleService.getOne(Wrappers.lambdaQuery(UserRole.class) |
|
|
|
.eq(UserRole::getRoleId, expertRole.getId()).eq(UserRole::getUserId,userId)); |
|
|
|
if (Objects.isNull(expertUserRole)) { |
|
|
|
expertUserRole = new UserRole(); |
|
|
|
expertUserRole.setUserId(userId); |
|
|
|