Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
ne-shield-trialdrive-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 039b160a
authored
Mar 21, 2022
by
levphon
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
指定授权代码优化
1 parent
fe22e2c1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
src/main/java/cn/com/glsx/admin/modules/service/VehicleService.java
src/main/java/cn/com/glsx/admin/modules/service/VehicleService.java
View file @
039b160
...
@@ -1893,16 +1893,16 @@ public class VehicleService {
...
@@ -1893,16 +1893,16 @@ public class VehicleService {
log
.
info
(
"被授权人的资源用户列表:{}"
,
JSONUtil
.
toJsonStr
(
subordinateIds
));
log
.
info
(
"被授权人的资源用户列表:{}"
,
JSONUtil
.
toJsonStr
(
subordinateIds
));
//差集 (userIdSet - subordinateIds),排除被分享用户本身常规权限能看到的用户资源
//差集 (userIdSet - subordinateIds),排除被分享用户本身常规权限能看到的用户资源
List
<
Long
>
re
duceRe
sourceUserIds
=
userIdSet
.
stream
().
filter
(
item
->
!
subordinateIds
.
contains
(
item
)).
collect
(
Collectors
.
toList
());
List
<
Long
>
resourceUserIds
=
userIdSet
.
stream
().
filter
(
item
->
!
subordinateIds
.
contains
(
item
)).
collect
(
Collectors
.
toList
());
log
.
info
(
"最终查询的资源用户列表:{}"
,
JSONUtil
.
toJsonStr
(
re
duceRe
sourceUserIds
));
log
.
info
(
"最终查询的资源用户列表:{}"
,
JSONUtil
.
toJsonStr
(
resourceUserIds
));
if
(
CollectionUtils
.
isEmpty
(
userIdSet
))
{
if
(
CollectionUtils
.
isEmpty
(
resourceUserIds
))
{
return
Lists
.
newArrayList
();
return
Lists
.
newArrayList
();
}
}
StopWatch
sw
=
new
StopWatch
();
StopWatch
sw
=
new
StopWatch
();
sw
.
start
(
"task1-获取用户车辆资源"
);
sw
.
start
(
"task1-获取用户车辆资源"
);
VehicleTreeSearch
vtSearch
=
new
VehicleTreeSearch
().
setUserIds
(
re
duceRe
sourceUserIds
);
VehicleTreeSearch
vtSearch
=
new
VehicleTreeSearch
().
setUserIds
(
resourceUserIds
);
List
<
OrgVehicleModel
>
modelList
=
vehicleMapper
.
selectOrgVehicle
(
vtSearch
);
List
<
OrgVehicleModel
>
modelList
=
vehicleMapper
.
selectOrgVehicle
(
vtSearch
);
log
.
info
(
"用户{}下可被授权总车辆数{}"
,
userIdStrSet
,
modelList
.
size
());
log
.
info
(
"用户{}下可被授权总车辆数{}"
,
userIdStrSet
,
modelList
.
size
());
sw
.
stop
();
sw
.
stop
();
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment