From 250041084634d06b83c3c0502ccb24641d6e0bad Mon Sep 17 00:00:00 2001 From: chen <1251790704@qq.com> Date: Tue, 9 Mar 2021 16:18:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ProjectManagementController.java | 2 +- .../liuwanr/entity/ProjectManagement.java | 30 +++++++++++++++++++ .../mapper/ProjectManagementMapper.java | 12 +++----- 3 files changed, 35 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/yipin/liuwanr/controller/ProjectManagementController.java b/src/main/java/com/yipin/liuwanr/controller/ProjectManagementController.java index 33e4df3..3fde87f 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 70b3ca4..c2d3719 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 8f9ba21..629fb60 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);