From 3a4185f3720b4cb6aa8914642afc5f5172d35961 Mon Sep 17 00:00:00 2001 From: caofengbin <1050430934@qq.com> Date: Sun, 4 Feb 2024 16:26:33 +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->=E8=A7=92=E8=89=B2=E7=AE=A1=E7=90=86=EF=BC=8C?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=95=B0=E6=8D=AE=E5=88=86=E9=A1=B5=E8=AF=B7?= =?UTF-8?q?=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cloud/sonic/controller/controller/RolesController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sonic-server-controller/src/main/java/org/cloud/sonic/controller/controller/RolesController.java b/sonic-server-controller/src/main/java/org/cloud/sonic/controller/controller/RolesController.java index 6f8adff8..67b52ccf 100644 --- a/sonic-server-controller/src/main/java/org/cloud/sonic/controller/controller/RolesController.java +++ b/sonic-server-controller/src/main/java/org/cloud/sonic/controller/controller/RolesController.java @@ -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> 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 pageable = new Page<>(page, 20); + Page pageable = new Page<>(page, pageSize); if (isAll) { pageable.setSize(1000L); }