瀏覽代碼

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

tags/24080901
niohe·erbao 1 年之前
父節點
當前提交
9ac2c31680
共有 1 個檔案被更改,包括 2 行新增1 行删除
  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 查看文件

@@ -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…
取消
儲存