diff --git a/kernel-s-system/system-business-permission/src/main/java/cn/stylefeng/roses/kernel/sys/modular/role/service/impl/SysRoleMenuOptionsServiceImpl.java b/kernel-s-system/system-business-permission/src/main/java/cn/stylefeng/roses/kernel/sys/modular/role/service/impl/SysRoleMenuOptionsServiceImpl.java index f7b8e507e..b2cb2f296 100644 --- a/kernel-s-system/system-business-permission/src/main/java/cn/stylefeng/roses/kernel/sys/modular/role/service/impl/SysRoleMenuOptionsServiceImpl.java +++ b/kernel-s-system/system-business-permission/src/main/java/cn/stylefeng/roses/kernel/sys/modular/role/service/impl/SysRoleMenuOptionsServiceImpl.java @@ -71,6 +71,9 @@ public class SysRoleMenuOptionsServiceImpl extends ServiceImpl wrapper = new LambdaQueryWrapper<>(); wrapper.in(SysRoleMenuOptions::getRoleId, beRemovedRoleIdList); this.remove(wrapper); + + // 清空角色和菜单功能的绑定 + roleMenuOptionsCache.remove(beRemovedRoleIdList.stream().map(Object::toString).collect(Collectors.toList())); } @Override diff --git a/kernel-s-system/system-business-permission/src/main/java/cn/stylefeng/roses/kernel/sys/modular/role/service/impl/SysRoleMenuServiceImpl.java b/kernel-s-system/system-business-permission/src/main/java/cn/stylefeng/roses/kernel/sys/modular/role/service/impl/SysRoleMenuServiceImpl.java index e883e3fff..b40e60b94 100644 --- a/kernel-s-system/system-business-permission/src/main/java/cn/stylefeng/roses/kernel/sys/modular/role/service/impl/SysRoleMenuServiceImpl.java +++ b/kernel-s-system/system-business-permission/src/main/java/cn/stylefeng/roses/kernel/sys/modular/role/service/impl/SysRoleMenuServiceImpl.java @@ -61,6 +61,9 @@ public class SysRoleMenuServiceImpl extends ServiceImpl