From 9bf5dfdc5fff341046315c3d1cb0b0233003c0a4 Mon Sep 17 00:00:00 2001 From: runphp Date: Fri, 31 Dec 2021 06:54:22 +0000 Subject: [PATCH] =?UTF-8?q?=E5=87=8F=E5=B0=91=E4=B8=80=E6=AC=A1sql?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=EF=BC=88SysUser=E5=AF=B9=E8=B1=A1=E5=8C=85?= =?UTF-8?q?=E5=90=AB=E4=BA=86=E8=A7=92=E8=89=B2=E5=88=97=E8=A1=A8=EF=BC=89?= =?UTF-8?q?=20=E5=87=8F=E5=B0=91=E4=B8=80=E6=AC=A1sql=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=EF=BC=88SysUser=E5=AF=B9=E8=B1=A1=E5=8C=85=E5=90=AB=E4=BA=86?= =?UTF-8?q?=E8=A7=92=E8=89=B2=E5=88=97=E8=A1=A8=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/system/controller/SysUserController.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysUserController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysUserController.java index 2d7c00643..bc94e4210 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysUserController.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysUserController.java @@ -179,9 +179,10 @@ public class SysUserController extends BaseController ajax.put("posts", postService.selectPostAll()); if (StringUtils.isNotNull(userId)) { - ajax.put(AjaxResult.DATA_TAG, userService.selectUserById(userId)); + SysUser sysUser = userService.selectUserById(userId); + ajax.put(AjaxResult.DATA_TAG, sysUser); 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; }