Browse Source

fix 专家管理员 新增专家自动补充专家角色

tags/24080901
niohe·erbao 1 year ago
parent
commit
9ac2c31680
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertManage.java

+ 2
- 1
pmapi/src/main/java/com/ningdatech/pmapi/expert/manage/ExpertManage.java View File

@@ -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);


Loading…
Cancel
Save