mirror of https://github.com/elunez/eladmin
parent
00f7939d47
commit
ca43526915
14
README.md
14
README.md
|
@ -106,20 +106,6 @@
|
|||
</tr>
|
||||
</table>
|
||||
|
||||
#### 特别鸣谢
|
||||
|
||||
- 感谢 [JetBrains](https://www.jetbrains.com/) 提供的非商业开源软件开发授权
|
||||
|
||||
- 感谢 [PanJiaChen](https://github.com/PanJiaChen/vue-element-admin) 大佬提供的前端模板
|
||||
|
||||
- 感谢 [Moxun](https://github.com/moxun1639) 大佬提供的前端 Curd 通用组件
|
||||
|
||||
- 感谢 [zhy6599](https://gitee.com/zhy6599) 大佬提供的后端运维管理相关功能
|
||||
|
||||
- 感谢 [j.yao.SUSE](https://github.com/everhopingandwaiting) 大佬提供的匿名接口与Redis限流等功能
|
||||
|
||||
- 感谢 [d15801543974](https://github.com/d15801543974) 大佬提供的基于注解的通用查询方式
|
||||
|
||||
#### 项目捐赠
|
||||
项目的发展离不开你的支持,请作者喝杯咖啡吧☕ [Donate](https://el-admin.vip/donation/)
|
||||
|
||||
|
|
|
@ -119,13 +119,13 @@ public class RoleServiceImpl implements RoleService {
|
|||
@Override
|
||||
public void updateMenu(Role resources, RoleDto roleDTO) {
|
||||
Role role = roleMapper.toEntity(roleDTO);
|
||||
// 清理缓存
|
||||
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());
|
||||
// 清理缓存
|
||||
redisUtils.delByKeys("menu::user:",userIds);
|
||||
redisUtils.del("role::id:" + resources.getId());
|
||||
roleRepository.save(role);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue