Commit 039b160a by levphon

指定授权代码优化

1 parent fe22e2c1
......@@ -1893,16 +1893,16 @@ public class VehicleService {
log.info("被授权人的资源用户列表:{}", JSONUtil.toJsonStr(subordinateIds));
//差集 (userIdSet - subordinateIds),排除被分享用户本身常规权限能看到的用户资源
List<Long> reduceResourceUserIds = userIdSet.stream().filter(item -> !subordinateIds.contains(item)).collect(Collectors.toList());
log.info("最终查询的资源用户列表:{}", JSONUtil.toJsonStr(reduceResourceUserIds));
List<Long> resourceUserIds = userIdSet.stream().filter(item -> !subordinateIds.contains(item)).collect(Collectors.toList());
log.info("最终查询的资源用户列表:{}", JSONUtil.toJsonStr(resourceUserIds));
if (CollectionUtils.isEmpty(userIdSet)) {
if (CollectionUtils.isEmpty(resourceUserIds)) {
return Lists.newArrayList();
}
StopWatch sw = new StopWatch();
sw.start("task1-获取用户车辆资源");
VehicleTreeSearch vtSearch = new VehicleTreeSearch().setUserIds(reduceResourceUserIds);
VehicleTreeSearch vtSearch = new VehicleTreeSearch().setUserIds(resourceUserIds);
List<OrgVehicleModel> modelList = vehicleMapper.selectOrgVehicle(vtSearch);
log.info("用户{}下可被授权总车辆数{}", userIdStrSet, modelList.size());
sw.stop();
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!