userexamine

master
20918 12 months ago
parent 590e9ec531
commit ba5d53d823

@ -20,6 +20,7 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.stream.Collectors;
@Controller
@RequestMapping("/system/userexamine")
@ -27,6 +28,10 @@ public class SysUserExamineController extends BaseController {
private String prefix = "system/user/userexamine";
@Autowired
private ISysUserService userService;
@Autowired
private ISysRoleService roleService;
@Autowired
private ISysPostService postService;
@RequiresPermissions("system:userexamine:view")
@GetMapping()
public String user()
@ -56,7 +61,11 @@ public class SysUserExamineController extends BaseController {
@GetMapping("/examine/{userId}")
public String userExamine(@PathVariable("userId") Long userId, ModelMap mmap)
{
userService.checkUserDataScope(userId);
List<SysRole> 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 + "/examinedetail";
}

Loading…
Cancel
Save