fix(system/role): 修复角色菜单权限缓存未清理错误,优化角色菜单缓存逻辑

Closes #IBNENK
This commit is contained in:
2025-02-27 20:02:53 +08:00
parent 65941c1ee4
commit 0a62f81ad7
9 changed files with 50 additions and 47 deletions

View File

@@ -131,7 +131,7 @@ public class DemoEnvironmentJob {
roleMenuMapper.lambdaUpdate().notIn(RoleMenuDO::getRoleId, ROLE_FLAG).remove();
return roleMapper.lambdaUpdate().notIn(RoleDO::getId, ROLE_FLAG).remove();
});
this.clean(menuCount, "菜单", CacheConstants.MENU_KEY_PREFIX, () -> menuMapper.lambdaUpdate()
this.clean(menuCount, "菜单", CacheConstants.ROLE_MENU_KEY_PREFIX, () -> menuMapper.lambdaUpdate()
.gt(MenuDO::getId, DELETE_FLAG)
.remove());
this.clean(deptCount, "部门", null, () -> deptMapper.lambdaUpdate().gt(DeptDO::getId, DEPT_FLAG).remove());