userexamine

master
20918 12 months ago
parent 88265c370e
commit f6aed30243

@ -61,7 +61,9 @@ public class SysUserExamineController extends BaseController {
public String userExamine(@PathVariable("userId") Long userId, ModelMap mmap) public String userExamine(@PathVariable("userId") Long userId, ModelMap mmap)
{ {
userService.checkUserDataScope(userId); userService.checkUserDataScope(userId);
SysUser sysuser = getSysUser();
List<SysRole> roles = roleService.selectRolesByUserId(userId); List<SysRole> roles = roleService.selectRolesByUserId(userId);
mmap.put("sysuser",sysuser);
mmap.put("user", userService.selectUserById(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("roles", SysUser.isAdmin(userId) ? roles : roles.stream().filter(r -> !r.isAdmin()).collect(Collectors.toList()));
mmap.put("posts", postService.selectPostsByUserId(userId)); mmap.put("posts", postService.selectPostsByUserId(userId));

Loading…
Cancel
Save