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 9560e2c commit fb1d287
Showing 1 changed file with 5 additions and 3 deletions.
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

0 comments on commit fb1d287

Please sign in to comment.