Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix:后台管理中心,权限配置的三个tab,不支持前端的分页参数请求,bug fix #419

Merged
merged 3 commits into from
Feb 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,13 @@ public class ResourcesController {
@Operation(summary = "查询所有资源连接", description = "查询所有资源连接")
@GetMapping("/list")
@Parameters(value = {
@Parameter(name = "page", description = "页码")
@Parameter(name = "page", description = "页码"),
@Parameter(name = "pageSize", description = "每页请求数量")
})
public RespModel<CommentPage<ResourcesDTO>> listResources(@RequestParam(name = "page") int page,
@RequestParam(name = "pageSize") int pageSize,
@RequestParam(name = "path", required = false) String path) {
Page<Resources> pageable = new Page<>(page, 20);
Page<Resources> pageable = new Page<>(page, pageSize);

return RespModel.result(RespEnum.SEARCH_OK, resourcesService.listResource(pageable, path, false));
}
Expand All @@ -48,7 +50,7 @@ public RespModel<CommentPage<ResourcesDTO>> listResources(@RequestParam(name = "
@PostMapping("/refresh")
public RespModel<CommentPage<ResourcesDTO>> refreshResources() {
resourcesService.init();
return listResources(1, null);
return listResources(1, 20, null);
}


Expand Down
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
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
Loading