Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
smart_gov_platform
Commits
677bdec6
Commit
677bdec6
authored
Nov 14, 2023
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
角色菜单非空过滤
parent
02a8aa77
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
portal-manager/src/main/java/com/mortals/xhx/module/role/service/impl/RoleAuthServiceImpl.java
...als/xhx/module/role/service/impl/RoleAuthServiceImpl.java
+1
-1
portal-manager/src/main/java/com/mortals/xhx/module/role/service/impl/RoleServiceImpl.java
...mortals/xhx/module/role/service/impl/RoleServiceImpl.java
+1
-1
No files found.
portal-manager/src/main/java/com/mortals/xhx/module/role/service/impl/RoleAuthServiceImpl.java
View file @
677bdec6
...
@@ -97,7 +97,7 @@ public class RoleAuthServiceImpl extends AbstractCRUDServiceImpl<RoleAuthDao, Ro
...
@@ -97,7 +97,7 @@ public class RoleAuthServiceImpl extends AbstractCRUDServiceImpl<RoleAuthDao, Ro
condition
.
setRoleId
(
roleId
);
condition
.
setRoleId
(
roleId
);
List
<
RoleAuthEntity
>
roleModelEntities
=
this
.
find
(
condition
);
List
<
RoleAuthEntity
>
roleModelEntities
=
this
.
find
(
condition
);
if
(
CollectionUtils
.
isNotEmpty
(
roleModelEntities
))
{
if
(
CollectionUtils
.
isNotEmpty
(
roleModelEntities
))
{
List
<
Long
>
menuIds
=
roleModelEntities
.
stream
().
map
(
RoleAuthEntity:
:
getMenuId
).
collect
(
Collectors
.
toList
());
List
<
Long
>
menuIds
=
roleModelEntities
.
stream
().
filter
(
m
->
m
.
getMenuId
()!=
null
).
map
(
RoleAuthEntity:
:
getMenuId
).
collect
(
Collectors
.
toList
());
MenuQuery
query1
=
new
MenuQuery
();
MenuQuery
query1
=
new
MenuQuery
();
query1
.
setIdList
(
menuIds
);
query1
.
setIdList
(
menuIds
);
List
<
MenuEntity
>
menuEntities
=
menuService
.
find
(
query1
);
List
<
MenuEntity
>
menuEntities
=
menuService
.
find
(
query1
);
...
...
portal-manager/src/main/java/com/mortals/xhx/module/role/service/impl/RoleServiceImpl.java
View file @
677bdec6
...
@@ -44,7 +44,7 @@ public class RoleServiceImpl extends AbstractCRUDServiceImpl<RoleDao, RoleEntity
...
@@ -44,7 +44,7 @@ public class RoleServiceImpl extends AbstractCRUDServiceImpl<RoleDao, RoleEntity
@Override
@Override
protected
void
findAfter
(
RoleEntity
entity
,
Context
context
,
List
<
RoleEntity
>
list
)
throws
AppException
{
protected
void
findAfter
(
RoleEntity
entity
,
Context
context
,
List
<
RoleEntity
>
list
)
throws
AppException
{
list
.
stream
().
forEach
(
item
->{
list
.
stream
().
forEach
(
item
->{
List
<
Long
>
menuIds
=
roleAuthService
.
find
(
new
RoleAuthQuery
().
roleId
(
item
.
getId
())).
stream
().
map
(
m
->
m
.
getMenuId
()).
collect
(
Collectors
.
toList
());
List
<
Long
>
menuIds
=
roleAuthService
.
find
(
new
RoleAuthQuery
().
roleId
(
item
.
getId
())).
stream
().
filter
(
m
->
m
.
getMenuId
()!=
null
).
map
(
m
->
m
.
getMenuId
()).
collect
(
Collectors
.
toList
());
if
(!
ObjectUtils
.
isEmpty
(
menuIds
)){
if
(!
ObjectUtils
.
isEmpty
(
menuIds
)){
item
.
setMenuIdList
(
menuIds
);
item
.
setMenuIdList
(
menuIds
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment