diff --git a/src/main/java/com/jsl/oa/dao/ProjectDAO.java b/src/main/java/com/jsl/oa/dao/ProjectDAO.java index be19ea8..f635a2d 100644 --- a/src/main/java/com/jsl/oa/dao/ProjectDAO.java +++ b/src/main/java/com/jsl/oa/dao/ProjectDAO.java @@ -109,10 +109,10 @@ public class ProjectDAO { log.info("\t> 执行 DAO 层 ProjectDAO.get 方法"); log.info("\t\t> 从 MySQL 获取数据"); if(isFinish != null){ - return projectMapper.getByIsfinish(isFinish); + return projectMapper.getByIsfinish(userId,isFinish); } if(tags != null && !tags.isEmpty()){ - return projectMapper.getByTags(tags); + return projectMapper.getByTags(userId,tags); } if(listAll == 0) { return projectMapper.get(userId); diff --git a/src/main/java/com/jsl/oa/mapper/ProjectMapper.java b/src/main/java/com/jsl/oa/mapper/ProjectMapper.java index 4453bf9..4ce6b46 100644 --- a/src/main/java/com/jsl/oa/mapper/ProjectMapper.java +++ b/src/main/java/com/jsl/oa/mapper/ProjectMapper.java @@ -43,15 +43,15 @@ public interface ProjectMapper { //@Select("select * from organize_oa.oa_project where json_extract(tags,'$.tags')" + //"like concat('%',#{tags},'%')") - @Select("select * from organize_oa.oa_project where is_finish=#{isFinish} and is_delete=false") - ListgetByIsfinish(Integer isFinish); + @Select("select * from organize_oa.oa_project where is_finish=#{isFinish} and is_delete=false and principal_id =#{userId}") + ListgetByIsfinish(Long userId,Integer isFinish); - ListgetByTags(List tags); + ListgetByTags(Long userId,List tags); - @Select("select * from organize_oa.oa_project where is_delete=false and status =1") + @Select("select * from organize_oa.oa_project where is_delete=false and status =1 and principal_id=#{userId}") List get(Long userId); - @Select("select * from organize_oa.oa_project where status =1 and status=1") + @Select("select * from organize_oa.oa_project where status =1 and status=1 and principal_id=#{userId}") List get1(Long userId); @Select("select * from organize_oa.oa_project where name=#{name}") diff --git a/src/main/java/com/jsl/oa/services/impl/ProjectServiceImpl.java b/src/main/java/com/jsl/oa/services/impl/ProjectServiceImpl.java index 9a914ea..3306c12 100644 --- a/src/main/java/com/jsl/oa/services/impl/ProjectServiceImpl.java +++ b/src/main/java/com/jsl/oa/services/impl/ProjectServiceImpl.java @@ -204,7 +204,8 @@ public class ProjectServiceImpl implements ProjectService { List projectDOList = projectDAO.get(userId,listAll,tags,isFinish); return ResultUtil.success(projectDOList); }else { - List projectDOList = projectDAO.get(userId,0,tags,isFinish); + listAll = 0; + List projectDOList = projectDAO.get(userId,listAll,tags,isFinish); return ResultUtil.success(projectDOList); } diff --git a/src/main/resources/com/jsl/oa/mapper/ProjectMapper.xml b/src/main/resources/com/jsl/oa/mapper/ProjectMapper.xml index 07cbe27..f443087 100644 --- a/src/main/resources/com/jsl/oa/mapper/ProjectMapper.xml +++ b/src/main/resources/com/jsl/oa/mapper/ProjectMapper.xml @@ -51,7 +51,7 @@ select * from organize_oa.oa_project where + close=",'%') and is_delete=false and principal_id=#{userId}"> #{tag}