[代码完善](v2.5): v2.5 beta 优化角色缓存

2.5 进度: https://www.ydyno.com/archives/1225.html
pull/394/head
ZhengJie 2020-05-27 17:19:20 +08:00
parent fc7858f060
commit d0e3bd5574
1 changed files with 1 additions and 0 deletions

View File

@ -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);