查询bug
All checks were successful
JslGroup/JslDeveloper/JSL_OrganizeInternalOA/pipeline/head This commit looks good
All checks were successful
JslGroup/JslDeveloper/JSL_OrganizeInternalOA/pipeline/head This commit looks good
This commit is contained in:
parent
14c726cb9a
commit
5e1da6b079
|
@ -29,4 +29,8 @@ public interface ModuleMapper {
|
|||
|
||||
@Select("select * from organize_oa.oa_project_work where pid=#{id} and is_delete=0 and type=1 ")
|
||||
List<ProjectWorkDO> getAllMoudleByPid(Long id);
|
||||
|
||||
@Select("select principal_id from organize_oa.oa_project where id=(select project_id " +
|
||||
"from organize_oa.oa_project_work where oa_project_work.id = #{sysId})")
|
||||
Long getPridBySysyid(Integer sysId);
|
||||
}
|
||||
|
|
|
@ -52,9 +52,11 @@ public class ModuleServiceImpl implements ModuleService {
|
|||
Long userId = Processing.getAuthHeaderToUserId(request);
|
||||
//获取子系统负责人id
|
||||
Long pid = moduleMapper.getPidBySysid(sysId);
|
||||
//判断是否是子系统负责人
|
||||
//获取项目负责人id
|
||||
Long prid = moduleMapper.getPridBySysyid(sysId);
|
||||
//判断是否是子系统/项目负责人
|
||||
int is = 1;
|
||||
if(!pid.equals(userId)){
|
||||
if(!pid.equals(userId) && !prid.equals(userId)){
|
||||
is = 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<select id="getBySysId" resultType="com.jsl.oa.model.doData.ProjectWorkDO">
|
||||
select * from organize_oa.oa_project_work where pid=#{sysId} and type=1
|
||||
<if test="is != 1 ">
|
||||
and principal_id=#{userId}
|
||||
and (principal_id=#{userId} or principal_id is null)
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
Loading…
Reference in New Issue
Block a user