From f7b9d63db4abe6d6a53fa7f02aa1df58510a37bd Mon Sep 17 00:00:00 2001 From: "jiakun.lin" Date: Mon, 22 Mar 2021 16:34:54 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=B7=BB=E5=8A=A0=E5=88=86=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ProjectManagementController.java | 10 +++++++++- .../liuwanr/service/ProjectManagementService.java | 2 ++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/yipin/liuwanr/controller/ProjectManagementController.java b/src/main/java/com/yipin/liuwanr/controller/ProjectManagementController.java index 72d38aa..dae0ed0 100644 --- a/src/main/java/com/yipin/liuwanr/controller/ProjectManagementController.java +++ b/src/main/java/com/yipin/liuwanr/controller/ProjectManagementController.java @@ -62,7 +62,9 @@ public class ProjectManagementController { @ApiParam(name = "state", value = "项目状态(0、草稿箱 1、已发布)", required = false) @RequestParam(required = false) Integer state, @ApiParam(name = "projectName", value = "项目名称", required = false) @RequestParam(required = false) String projectName, @ApiParam(name = "systemId", value = "系统id", required = true) @RequestParam Integer systemId, - @ApiParam(name = "userId", value = "用户id", required = true) @RequestParam Integer userId) { + @ApiParam(name = "userId", value = "用户id", required = true) @RequestParam Integer userId, + @ApiParam(name = "pageNo", value = "起始页数", required = true) @RequestParam Integer pageNo, + @ApiParam(name = "pageSize", value = "页数", required = true) @RequestParam Integer pageSize) { Response resp = new Response(); ProjectManagement vo = new ProjectManagement(); if (null != projectPermissions) { @@ -83,6 +85,12 @@ public class ProjectManagementController { if (null != userId) { vo.setUserId(userId); } + if (null != pageNo){ + vo.setPageNo(pageNo); + } + if (null != pageSize){ + vo.setPageSize(pageSize); + } HashMap ret = service.queryAllManagements(vo); int status = (int) ret.get("retcode"); if (status == 200) { diff --git a/src/main/java/com/yipin/liuwanr/service/ProjectManagementService.java b/src/main/java/com/yipin/liuwanr/service/ProjectManagementService.java index cf58749..5f80b62 100644 --- a/src/main/java/com/yipin/liuwanr/service/ProjectManagementService.java +++ b/src/main/java/com/yipin/liuwanr/service/ProjectManagementService.java @@ -128,6 +128,8 @@ public class ProjectManagementService { vo.setUserId(null); } } + //分页 + PageHelper.startPage(vo.getPageNo(), vo.getPageSize()); //条件查询 List list = mapper.queryManagements(vo); //管理员权限id