Skip to content

Commit

Permalink
后台管理中心->用户配置管理,支持数据分页请求
Browse files Browse the repository at this point in the history
  • Loading branch information
caofengbin committed Feb 4, 2024
1 parent 3a4185f commit 3bb05e7
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,12 +143,14 @@ public RespModel<String> changePwd(HttpServletRequest request, @Validated @Reque
@GetMapping("/list")
@Parameters(value = {
@Parameter(name = "page", description = "页码"),
@Parameter(name = "pageSize", description = "每页请求数量"),
@Parameter(name = "userName", description = "角色名称"),

})
public RespModel<CommentPage<UsersDTO>> listResources(@RequestParam(name = "page") int page
, @RequestParam(name = "userName", required = false) String userName) {
Page<Users> pageable = new Page<>(page, 20);
public RespModel<CommentPage<UsersDTO>> listResources(@RequestParam(name = "page") int page,
@RequestParam(name = "pageSize", required = false, defaultValue = "20") int pageSize,
@RequestParam(name = "userName", required = false) String userName) {
Page<Users> pageable = new Page<>(page, pageSize);

return RespModel.result(RespEnum.SEARCH_OK, usersService.listUsers(pageable, userName));
}
Expand Down

0 comments on commit 3bb05e7

Please sign in to comment.