mirror of https://gitee.com/stylefeng/roses
【8.1.0】【role】更新角色修改,清空缓存
parent
4b0b037501
commit
141d97b99d
|
@ -71,6 +71,9 @@ public class SysRoleMenuOptionsServiceImpl extends ServiceImpl<SysRoleMenuOption
|
|||
} else {
|
||||
this.saveBatch(sysRoleMenuOptionList);
|
||||
}
|
||||
|
||||
// 清空角色和菜单功能的绑定
|
||||
roleMenuOptionsCache.remove(String.valueOf(roleId));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -123,6 +126,9 @@ public class SysRoleMenuOptionsServiceImpl extends ServiceImpl<SysRoleMenuOption
|
|||
LambdaQueryWrapper<SysRoleMenuOptions> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.in(SysRoleMenuOptions::getRoleId, beRemovedRoleIdList);
|
||||
this.remove(wrapper);
|
||||
|
||||
// 清空角色和菜单功能的绑定
|
||||
roleMenuOptionsCache.remove(beRemovedRoleIdList.stream().map(Object::toString).collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -61,6 +61,9 @@ public class SysRoleMenuServiceImpl extends ServiceImpl<SysRoleMenuMapper, SysRo
|
|||
} else {
|
||||
this.saveBatch(sysRoleMenus);
|
||||
}
|
||||
|
||||
// 清空角色和菜单的缓存
|
||||
roleMenuCache.remove(String.valueOf(roleId));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue