diff --git a/src/main/java/com/yipin/liuwanr/controller/ProjectManagementController.java b/src/main/java/com/yipin/liuwanr/controller/ProjectManagementController.java index 0ed47ce..9e45ded 100644 --- a/src/main/java/com/yipin/liuwanr/controller/ProjectManagementController.java +++ b/src/main/java/com/yipin/liuwanr/controller/ProjectManagementController.java @@ -171,7 +171,7 @@ public class ProjectManagementController { vo.setUserId(userId); } if (null != projectName) { - vo.setProjectName(projectName); + vo.setQueryName(projectName); } HashMap ret = service.queryManagements(vo,pageNo,pageSize); int status = (int) ret.get("retcode"); diff --git a/src/main/java/com/yipin/liuwanr/entity/ProjectManagement.java b/src/main/java/com/yipin/liuwanr/entity/ProjectManagement.java index 3e17a58..038f452 100644 --- a/src/main/java/com/yipin/liuwanr/entity/ProjectManagement.java +++ b/src/main/java/com/yipin/liuwanr/entity/ProjectManagement.java @@ -11,6 +11,12 @@ import io.swagger.annotations.ApiModelProperty; @ApiModel(value = "Project_Management对象", description = "项目管理对象Project_Management") public class ProjectManagement { + private Integer pageNo;// 第几页,页码 + + private Integer pageSize;// 每页展示的数据条数 + + private String queryName;// 模糊查询名称,与数据库字段区分 + @ApiModelProperty(value = "项目主键ID,编辑项目需要传,新增项目不需要传", name = "projectId", example = "223") private Integer projectId;// 项目主键ID @@ -59,6 +65,30 @@ public class ProjectManagement { @ApiModelProperty(hidden = true) private Integer isShow; + public Integer getPageNo() { + return pageNo; + } + + public String getQueryName() { + return queryName; + } + + public void setQueryName(String queryName) { + this.queryName = queryName; + } + + public void setPageNo(Integer pageNo) { + this.pageNo = pageNo; + } + + public Integer getPageSize() { + return pageSize; + } + + public void setPageSize(Integer pageSize) { + this.pageSize = pageSize; + } + @ApiModelProperty(value = "是否启用实验数据(0启用 1不启用)", name = "isstartexperimental", example = "0", required = true) private Integer isstartexperimental;//是否启用实验数据(0启用 1不启用) diff --git a/src/main/java/com/yipin/liuwanr/mapper/ProjectManagementMapper.java b/src/main/java/com/yipin/liuwanr/mapper/ProjectManagementMapper.java index 67f7c73..d86d9a5 100644 --- a/src/main/java/com/yipin/liuwanr/mapper/ProjectManagementMapper.java +++ b/src/main/java/com/yipin/liuwanr/mapper/ProjectManagementMapper.java @@ -1,14 +1,9 @@ package com.yipin.liuwanr.mapper; -import java.util.List; - import com.yipin.liuwanr.entity.*; -import org.apache.ibatis.annotations.Delete; -import org.apache.ibatis.annotations.Insert; -import org.apache.ibatis.annotations.Options; -import org.apache.ibatis.annotations.Param; -import org.apache.ibatis.annotations.Select; -import org.apache.ibatis.annotations.Update; +import org.apache.ibatis.annotations.*; + +import java.util.List; /** * 项目管理系统 项目管理表 @@ -77,6 +72,7 @@ public interface ProjectManagementMapper { "AND roleId NOT LIKE '%3%' AND isdel = 0 AND projectPermissions != 0", " AND ((roleId NOT LIKE '%3%' AND isdel = 0 AND projectPermissions != 0) OR ( isdel = 0 AND projectPermissions != 0 AND userId = #{userId} ))",//教师端,一开始进入项目管理,看见自己创建的和其他人看见的 " and systemId=#{systemId}", + " and projectName LIKE '%' #{queryName} '%'", " ORDER BY creationTime desc", ""}) List queryManagementsExportTest(ProjectManagement management);