From bb373e412599a89fef1abe4acd8ef0348d43fb92 Mon Sep 17 00:00:00 2001
From: shijie <648688341@qq.com>
Date: Tue, 9 Mar 2021 16:21:11 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B6=85=E7=AE=A1=E5=88=9B=E5=BB=BA=E9=A1=B9?=
=?UTF-8?q?=E7=9B=AE=EF=BC=8C=E5=85=B6=E4=BB=96=E6=88=90=E5=91=98=E5=8F=AF?=
=?UTF-8?q?=E4=BB=A5=E6=9F=A5=E7=9C=8B=E5=88=97=E8=A1=A8bug=E4=BF=AE?=
=?UTF-8?q?=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../liuwanr/controller/ProjectManagementController.java | 4 ++--
.../java/com/yipin/liuwanr/entity/ProjectManagement.java | 6 +++---
.../com/yipin/liuwanr/mapper/ProjectManagementMapper.java | 2 +-
3 files changed, 6 insertions(+), 6 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..0ed47ce 100644
--- a/src/main/java/com/yipin/liuwanr/controller/ProjectManagementController.java
+++ b/src/main/java/com/yipin/liuwanr/controller/ProjectManagementController.java
@@ -58,7 +58,7 @@ public class ProjectManagementController {
@GetMapping("/queryAllManagements")
Response queryAllManagements(
@ApiParam(name = "projectPermissions", value = "项目权限(0、练习 1、考核 2、竞赛)", required = false) @RequestParam(required = false) Integer projectPermissions,
- @ApiParam(name = "founder", value = "项目创建人(0、系统 1、老师)", required = false) @RequestParam(required = false) Integer founder,
+ @ApiParam(name = "founder", value = "项目创建人(0、系统 1、老师)", required = false) @RequestParam(required = false) String founder,
@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,
@@ -68,7 +68,7 @@ public class ProjectManagementController {
if (null != projectPermissions) {
vo.setProjectPermissions(projectPermissions);
}
- if (null != founder) {
+ if (null != founder && founder !="") {
vo.setFounder(founder);
}
if (null != state) {
diff --git a/src/main/java/com/yipin/liuwanr/entity/ProjectManagement.java b/src/main/java/com/yipin/liuwanr/entity/ProjectManagement.java
index 70b3ca4..3e17a58 100644
--- a/src/main/java/com/yipin/liuwanr/entity/ProjectManagement.java
+++ b/src/main/java/com/yipin/liuwanr/entity/ProjectManagement.java
@@ -21,7 +21,7 @@ public class ProjectManagement {
private Integer projectPermissions;// 项目权限(0、练习 1、考核 2、竞赛)
@ApiModelProperty(value = "创建人(0、系统 1、老师)", name = "founder", example = "0", required = true)
- private Integer founder;// 创建人(0、系统 1、老师)
+ private String founder;// 创建人(0、系统 1、老师)
@ApiModelProperty(hidden = true)
private String creationTime;// 创建时间
@@ -154,11 +154,11 @@ public class ProjectManagement {
this.projectPermissions = projectPermissions;
}
- public Integer getFounder() {
+ public String getFounder() {
return founder;
}
- public void setFounder(Integer founder) {
+ public void setFounder(String founder) {
this.founder = founder;
}
diff --git a/src/main/java/com/yipin/liuwanr/mapper/ProjectManagementMapper.java b/src/main/java/com/yipin/liuwanr/mapper/ProjectManagementMapper.java
index 8f9ba21..67f7c73 100644
--- a/src/main/java/com/yipin/liuwanr/mapper/ProjectManagementMapper.java
+++ b/src/main/java/com/yipin/liuwanr/mapper/ProjectManagementMapper.java
@@ -46,7 +46,7 @@ public interface ProjectManagementMapper {
// "select projectId,projectName,projectPermissions,founder,creationTime,state,knowledgePoints,experimentIntroduction from hr_project_management where isdel=0",
"select * from hr_project_management where 1 = 1",// (roleId NOT LIKE '%3%' AND isdel = 0)",
" AND roleId NOT LIKE '%3%' AND isdel = 0",
- " AND ((roleId NOT LIKE '%3%' AND isdel = 0) OR ( isdel = 0 AND userId = #{userId} ))",//教师端,一开始进入项目管理,看见自己创建的和其他人看见的
+ " AND ((FIND_IN_SET(1,founder) AND isdel = 0) OR ( isdel = 0 AND userId = #{userId} ))",//教师端,一开始进入项目管理,看见自己创建的和其他人看见的
" and projectPermissions=#{projectPermissions}",
" and founder=#{founder}",//教师选择创建人为系统
" and state=#{state}",