项目管理列表添加分页

master
jiakun.lin 4 years ago
parent adc4ff1654
commit f7b9d63db4
  1. 10
      src/main/java/com/yipin/liuwanr/controller/ProjectManagementController.java
  2. 2
      src/main/java/com/yipin/liuwanr/service/ProjectManagementService.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<String, Object> ret = service.queryAllManagements(vo);
int status = (int) ret.get("retcode");
if (status == 200) {

@ -128,6 +128,8 @@ public class ProjectManagementService {
vo.setUserId(null);
}
}
//分页
PageHelper.startPage(vo.getPageNo(), vo.getPageSize());
//条件查询
List<ProjectManagement> list = mapper.queryManagements(vo);
//管理员权限id

Loading…
Cancel
Save