From 141d97b99da8b36d0289231ddd50496dd66330e4 Mon Sep 17 00:00:00 2001 From: fengshuonan Date: Tue, 23 Jan 2024 16:04:30 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=908.1.0=E3=80=91=E3=80=90role=E3=80=91?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=A7=92=E8=89=B2=E4=BF=AE=E6=94=B9=EF=BC=8C?= =?UTF-8?q?=E6=B8=85=E7=A9=BA=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../role/service/impl/SysRoleMenuOptionsServiceImpl.java | 6 ++++++ .../modular/role/service/impl/SysRoleMenuServiceImpl.java | 3 +++ 2 files changed, 9 insertions(+) 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