|
|
@ -701,17 +701,19 @@ public class ResourcesService extends BaseService { |
|
|
|
if (checkAdmin(loginUser, result)) { |
|
|
|
if (checkAdmin(loginUser, result)) { |
|
|
|
return result; |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
List<Resource> resourceList = resourcesMapper.queryResourceExceptUserId(userId); |
|
|
|
List<Resource> resourceList = resourcesMapper.queryResourceExceptUserId(userId); |
|
|
|
Set<Resource> resourceSet = null; |
|
|
|
List<Object> list ; |
|
|
|
if (resourceList != null && resourceList.size() > 0) { |
|
|
|
if (resourceList != null && resourceList.size() > 0) { |
|
|
|
resourceSet = new HashSet<>(resourceList); |
|
|
|
Set<Resource> resourceSet = new HashSet<>(resourceList); |
|
|
|
|
|
|
|
|
|
|
|
List<Resource> authedResourceList = resourcesMapper.queryAuthorizedResourceList(userId); |
|
|
|
List<Resource> authedResourceList = resourcesMapper.queryAuthorizedResourceList(userId); |
|
|
|
|
|
|
|
|
|
|
|
getAuthorizedResourceList(resourceSet, authedResourceList); |
|
|
|
getAuthorizedResourceList(resourceSet, authedResourceList); |
|
|
|
|
|
|
|
list = new ArrayList<>(resourceSet); |
|
|
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
list = new ArrayList<>(0); |
|
|
|
} |
|
|
|
} |
|
|
|
result.put(Constants.DATA_LIST, new ArrayList<>(resourceSet)); |
|
|
|
|
|
|
|
|
|
|
|
result.put(Constants.DATA_LIST, list); |
|
|
|
putMsg(result,Status.SUCCESS); |
|
|
|
putMsg(result,Status.SUCCESS); |
|
|
|
return result; |
|
|
|
return result; |
|
|
|
} |
|
|
|
} |
|
|
|