超管创建项目,其他成员可以查看列表bug修复

master
shijie 4 years ago
parent d97a38a146
commit bb373e4125
  1. 4
      src/main/java/com/yipin/liuwanr/controller/ProjectManagementController.java
  2. 6
      src/main/java/com/yipin/liuwanr/entity/ProjectManagement.java
  3. 2
      src/main/java/com/yipin/liuwanr/mapper/ProjectManagementMapper.java

@ -58,7 +58,7 @@ public class ProjectManagementController {
@GetMapping("/queryAllManagements") @GetMapping("/queryAllManagements")
Response queryAllManagements( Response queryAllManagements(
@ApiParam(name = "projectPermissions", value = "项目权限(0、练习 1、考核 2、竞赛)", required = false) @RequestParam(required = false) Integer projectPermissions, @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 = "state", value = "项目状态(0、草稿箱 1、已发布)", required = false) @RequestParam(required = false) Integer state,
@ApiParam(name = "projectName", value = "项目名称", required = false) @RequestParam(required = false) String projectName, @ApiParam(name = "projectName", value = "项目名称", required = false) @RequestParam(required = false) String projectName,
@ApiParam(name = "systemId", value = "系统id", required = true) @RequestParam Integer systemId, @ApiParam(name = "systemId", value = "系统id", required = true) @RequestParam Integer systemId,
@ -68,7 +68,7 @@ public class ProjectManagementController {
if (null != projectPermissions) { if (null != projectPermissions) {
vo.setProjectPermissions(projectPermissions); vo.setProjectPermissions(projectPermissions);
} }
if (null != founder) { if (null != founder && founder !="") {
vo.setFounder(founder); vo.setFounder(founder);
} }
if (null != state) { if (null != state) {

@ -21,7 +21,7 @@ public class ProjectManagement {
private Integer projectPermissions;// 项目权限(0、练习 1、考核 2、竞赛) private Integer projectPermissions;// 项目权限(0、练习 1、考核 2、竞赛)
@ApiModelProperty(value = "创建人(0、系统 1、老师)", name = "founder", example = "0", required = true) @ApiModelProperty(value = "创建人(0、系统 1、老师)", name = "founder", example = "0", required = true)
private Integer founder;// 创建人(0、系统 1、老师) private String founder;// 创建人(0、系统 1、老师)
@ApiModelProperty(hidden = true) @ApiModelProperty(hidden = true)
private String creationTime;// 创建时间 private String creationTime;// 创建时间
@ -154,11 +154,11 @@ public class ProjectManagement {
this.projectPermissions = projectPermissions; this.projectPermissions = projectPermissions;
} }
public Integer getFounder() { public String getFounder() {
return founder; return founder;
} }
public void setFounder(Integer founder) { public void setFounder(String founder) {
this.founder = founder; this.founder = founder;
} }

@ -46,7 +46,7 @@ public interface ProjectManagementMapper {
// "select projectId,projectName,projectPermissions,founder,creationTime,state,knowledgePoints,experimentIntroduction from hr_project_management where isdel=0", // "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)", "select * from hr_project_management where 1 = 1",// (roleId NOT LIKE '%3%' AND isdel = 0)",
" <if test='userId==null'>AND roleId NOT LIKE '%3%' AND isdel = 0</if>", " <if test='userId==null'>AND roleId NOT LIKE '%3%' AND isdel = 0</if>",
" <if test='userId!=null'>AND ((roleId NOT LIKE '%3%' AND isdel = 0) OR ( isdel = 0 AND userId = #{userId} ))</if>",//教师端,一开始进入项目管理,看见自己创建的和其他人看见的 " <if test='userId!=null'>AND ((FIND_IN_SET(1,founder) AND isdel = 0) OR ( isdel = 0 AND userId = #{userId} ))</if>",//教师端,一开始进入项目管理,看见自己创建的和其他人看见的
" <if test='projectPermissions!=null'> and projectPermissions=#{projectPermissions}</if>", " <if test='projectPermissions!=null'> and projectPermissions=#{projectPermissions}</if>",
" <if test='founder!=null'> and founder=#{founder}</if>",//教师选择创建人为系统 " <if test='founder!=null'> and founder=#{founder}</if>",//教师选择创建人为系统
" <if test='state!=null'> and state=#{state}</if>", " <if test='state!=null'> and state=#{state}</if>",

Loading…
Cancel
Save