From 0a1f5f57065674a11486e064f77893f5e0c84d1f Mon Sep 17 00:00:00 2001 From: 20918 <2091823062@qq.com> Date: Tue, 16 Apr 2024 11:15:18 +0800 Subject: [PATCH] userexamine --- .../web/controller/system/SysUserExamineController.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserExamineController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserExamineController.java index 9f0713a..96d1723 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserExamineController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserExamineController.java @@ -96,9 +96,13 @@ public class SysUserExamineController extends BaseController { @Log(title = "用户审核", businessType = BusinessType.PRINT) @GetMapping("/examineprint/{userId}") @ResponseBody - public SysUser paint(@PathVariable("userId") Long userId) + public String paint(@PathVariable("userId") Long userId,ModelMap mmap) { - return userService.selectUserById(userId); + List roles = roleService.selectRolesByUserId(userId); + mmap.put("user",userService.selectUserById(userId)); + mmap.put("roles", SysUser.isAdmin(userId) ? roles : roles.stream().filter(r -> !r.isAdmin()).collect(Collectors.toList())); + mmap.put("posts", postService.selectPostsByUserId(userId)); + return prefix + "/examineprint"; } }