TaskGroup remove query func permission check. (#10557)
This commit is contained in:
parent
0aba68f335
commit
bc4ceda4cf
|
|
@ -215,13 +215,14 @@ public class TaskGroupServiceImpl extends BaseServiceImpl implements TaskGroupSe
|
|||
public Map<String, Object> queryTaskGroupByProjectCode(User loginUser, int pageNo, int pageSize, Long projectCode) {
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
Page<TaskGroup> page = new Page<>(pageNo, pageSize);
|
||||
|
||||
boolean canOperatorPermissions = canOperatorPermissions(loginUser, null, AuthorizationType.TASK_GROUP, ApiFuncIdentificationConstant.TASK_GROUP_VIEW);
|
||||
if (!canOperatorPermissions){
|
||||
putMsg(result, Status.NO_CURRENT_OPERATING_PERMISSION);
|
||||
PageInfo<TaskGroup> emptyPageInfo = new PageInfo<>(pageNo, pageSize);
|
||||
Set<Integer> ids = resourcePermissionCheckService.userOwnedResourceIdsAcquisition(AuthorizationType.TASK_GROUP, loginUser.getId(), logger);
|
||||
if (ids.isEmpty()) {
|
||||
result.put(Constants.DATA_LIST, emptyPageInfo);
|
||||
putMsg(result, Status.SUCCESS);
|
||||
return result;
|
||||
}
|
||||
IPage<TaskGroup> taskGroupPaging = taskGroupMapper.queryTaskGroupPagingByProjectCode(page, projectCode);
|
||||
IPage<TaskGroup> taskGroupPaging = taskGroupMapper.queryTaskGroupPagingByProjectCode(page, new ArrayList<>(ids), projectCode);
|
||||
|
||||
return getStringObjectMap(pageNo, pageSize, result, taskGroupPaging);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ public interface TaskGroupMapper extends BaseMapper<TaskGroup> {
|
|||
|
||||
int selectCountByIdStatus(@Param("id") int id,@Param("status") int status);
|
||||
|
||||
IPage<TaskGroup> queryTaskGroupPagingByProjectCode(Page<TaskGroup> page, @Param("projectCode") Long projectCode);
|
||||
IPage<TaskGroup> queryTaskGroupPagingByProjectCode(Page<TaskGroup> page, @Param("ids") List<Integer> ids, @Param("projectCode") Long projectCode);
|
||||
|
||||
/**
|
||||
* listAuthorizedResource
|
||||
|
|
|
|||
|
|
@ -62,7 +62,14 @@
|
|||
<include refid="baseSql">
|
||||
</include>
|
||||
from t_ds_task_group
|
||||
where project_code in ( #{projectCode} , 0)
|
||||
where 1=1
|
||||
<if test="ids != null and ids.size() > 0">
|
||||
and id in
|
||||
<foreach collection="ids" item="i" open="(" close=")" separator=",">
|
||||
#{i}
|
||||
</foreach>
|
||||
</if>
|
||||
and project_code in ( #{projectCode} , 0)
|
||||
order by update_time desc
|
||||
</select>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue