From 10ae0bce65e6b33dbaec80d702372a39233775df Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sat, 1 Jan 2022 09:50:35 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E4=BF=AE=E6=94=B9=E5=87=8F?= =?UTF-8?q?=E5=B0=91=E4=B8=80=E6=AC=A1=E8=A7=92=E8=89=B2=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=85=B3=E8=81=94=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ruoyi/web/controller/system/SysUserController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java index 9aacc3b..77fcff9 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java @@ -104,9 +104,10 @@ public class SysUserController extends BaseController ajax.put("posts", postService.selectPostAll()); if (StringUtils.isNotNull(userId)) { + SysUser sysUser = userService.selectUserById(userId); ajax.put(AjaxResult.DATA_TAG, userService.selectUserById(userId)); ajax.put("postIds", postService.selectPostListByUserId(userId)); - ajax.put("roleIds", roleService.selectRoleListByUserId(userId)); + ajax.put("roleIds", sysUser.getRoles().stream().map(SysRole::getRoleId).collect(Collectors.toList())); } return ajax; }