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