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 fb1d287 commit 3a4185f
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,16 @@ public class RolesController {
@GetMapping("/list")
@Parameters(value = {
@Parameter(name = "page", description = "页码"),
@Parameter(name = "pageSize", description = "每页请求数量"),
@Parameter(name = "isAll", description = "是否全部"),
@Parameter(name = "roleName", description = "角色名称"),

})
public RespModel<CommentPage<RolesDTO>> listResources(@RequestParam(name = "page") int page,
@RequestParam(name = "pageSize", required = false, defaultValue = "20") int pageSize,
@RequestParam(name = "isAll", required = false) boolean isAll,
@RequestParam(name = "roleName", required = false) String roleName) {
Page<Roles> pageable = new Page<>(page, 20);
Page<Roles> pageable = new Page<>(page, pageSize);
if (isAll) {
pageable.setSize(1000L);
}
Expand Down

0 comments on commit 3a4185f

Please sign in to comment.