From 3bb05e7aa76898347c423fd167b7e77c75784ad3 Mon Sep 17 00:00:00 2001 From: caofengbin <1050430934@qq.com> Date: Sun, 4 Feb 2024 16:28:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E7=AE=A1=E7=90=86=E4=B8=AD?= =?UTF-8?q?=E5=BF=83->=E7=94=A8=E6=88=B7=E9=85=8D=E7=BD=AE=E7=AE=A1?= =?UTF-8?q?=E7=90=86=EF=BC=8C=E6=94=AF=E6=8C=81=E6=95=B0=E6=8D=AE=E5=88=86?= =?UTF-8?q?=E9=A1=B5=E8=AF=B7=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sonic/controller/controller/UsersController.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sonic-server-controller/src/main/java/org/cloud/sonic/controller/controller/UsersController.java b/sonic-server-controller/src/main/java/org/cloud/sonic/controller/controller/UsersController.java index 3b41acc2..fe5cb4c8 100644 --- a/sonic-server-controller/src/main/java/org/cloud/sonic/controller/controller/UsersController.java +++ b/sonic-server-controller/src/main/java/org/cloud/sonic/controller/controller/UsersController.java @@ -143,12 +143,14 @@ public RespModel changePwd(HttpServletRequest request, @Validated @Reque @GetMapping("/list") @Parameters(value = { @Parameter(name = "page", description = "页码"), + @Parameter(name = "pageSize", description = "每页请求数量"), @Parameter(name = "userName", description = "角色名称"), }) - public RespModel> listResources(@RequestParam(name = "page") int page - , @RequestParam(name = "userName", required = false) String userName) { - Page pageable = new Page<>(page, 20); + public RespModel> listResources(@RequestParam(name = "page") int page, + @RequestParam(name = "pageSize", required = false, defaultValue = "20") int pageSize, + @RequestParam(name = "userName", required = false) String userName) { + Page pageable = new Page<>(page, pageSize); return RespModel.result(RespEnum.SEARCH_OK, usersService.listUsers(pageable, userName)); }