修改系统和教师端分别进入项目管理的逻辑

master
pd 4 years ago
parent 84fa18bde2
commit a079c9e9c9
  1. 26
      src/main/java/com/yipin/liuwanr/mapper/Project_ManagementMapper.java
  2. 2
      src/main/java/com/yipin/liuwanr/service/Project_ManagementService.java

@ -34,15 +34,29 @@ public interface Project_ManagementMapper {
* *
* @param management * @param management
* @return * @return
* "select projectId,projectName,projectPermissions,founder,creationTime,state from hr_project_management where isdel=0",
* " <if test='projectPermissions!=null'> and projectPermissions=#{projectPermissions}</if>",
* " <if test='founder!=null and userId==null'> and founder=#{founder}</if>",//服务端跳项目管理
* " <if test='founder==null and userId!=null'> and (userId=#{userId} or founder = 0)</if>",//教师端,一开始进入项目管理,看见自己创建的和其他人看见的
* " <if test='founder==0 and userId!=null'> and founder=#{founder}</if>",//教师选择创建人为系统
* " <if test='founder==1 and userId!=null'> and userId=#{userId}</if>",//教师选则创建人为老师
* " <if test='state!=null'> and state=#{state}</if>",
* " <if test='systemId!=null'> and systemId=#{systemId}</if>",
* " <if test='projectName!=null'> and projectName like concat('%',#{projectName},'%')</if>",
* " ORDER BY creationTime desc",
*/ */
@Select({"<script>", @Select({"<script>",
"select projectId,projectName,projectPermissions,founder,creationTime,state from hr_project_management where isdel=0", "select projectId,projectName,projectPermissions,founder,creationTime,state from hr_project_management where isdel=0",
" <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='userId!=null'> and (userId=#{userId} or founder = 0)</if>", // " <if test='userId!=null'> and (userId=#{userId} or founder = 0)</if>",
" <if test='state!=null'> and state=#{state}</if>", " <if test='userId==null and founder!=null '> and founder=#{founder}</if>",//服务端跳项目管理
" <if test='systemId!=null'> and systemId=#{systemId}</if>", " <if test='userId!=null and founder==null'> and (userId=#{userId} or founder = 0)</if>",//教师端,一开始进入项目管理,看见自己创建的和其他人看见的
" <if test='projectName!=null'> and projectName like concat('%',#{projectName},'%')</if>", " <if test='userId!=null and founder==0'> and founder=#{founder}</if>",//教师选择创建人为系统
" <if test='userId!=null and founder==1'> and userId=#{userId}</if>",//教师选则创建人为老师
" <if test='state!=null'> and state=#{state}</if>",
" <if test='systemId!=null'> and systemId=#{systemId}</if>",
" <if test='projectName!=null'> and projectName like concat('%',#{projectName},'%')</if>",
" ORDER BY creationTime desc", " ORDER BY creationTime desc",
"</script>"}) "</script>"})
List<Project_Management> queryManagements(Project_Management management); List<Project_Management> queryManagements(Project_Management management);

@ -87,7 +87,7 @@ public class Project_ManagementService {
return resp; return resp;
} }
//角色等于管理员或者超级管理员 //角色等于管理员或者超级管理员
else if (roleId == 1 || roleId == 2) { else if (roleId == 1 ) {
vo.setUserId(null); vo.setUserId(null);
} }
} }

Loading…
Cancel
Save