Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Eladmin
Commits
d0e3bd55
Commit
d0e3bd55
authored
May 27, 2020
by
ZhengJie
Browse files
[代码完善](v2.5): v2.5 beta 优化角色缓存
2.5 进度:
https://www.ydyno.com/archives/1225.html
parent
fc7858f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
eladmin-system/src/main/java/me/zhengjie/modules/system/service/impl/RoleServiceImpl.java
View file @
d0e3bd55
...
...
@@ -123,6 +123,7 @@ public class RoleServiceImpl implements RoleService {
List
<
User
>
users
=
userRepository
.
findByRoleId
(
role
.
getId
());
Set
<
Long
>
userIds
=
users
.
stream
().
map
(
User:
:
getId
).
collect
(
Collectors
.
toSet
());
redisUtils
.
delByKeys
(
"menu::user:"
,
userIds
);
redisUtils
.
del
(
"role::id:"
+
resources
.
getId
());
// 更新菜单
role
.
setMenus
(
resources
.
getMenus
());
roleRepository
.
save
(
role
);
...
...
Write
Preview
Supports
Markdown
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