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"; } }