mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-09-10 19:00:53 +08:00
fix(system/role): 修复角色菜单权限缓存未清理错误,优化角色菜单缓存逻辑
Closes #IBNENK
This commit is contained in:
@@ -42,9 +42,9 @@ public class CacheConstants {
|
||||
public static final String USER_KEY_PREFIX = "USER" + DELIMITER;
|
||||
|
||||
/**
|
||||
* 菜单缓存键前缀
|
||||
* 角色菜单缓存键前缀
|
||||
*/
|
||||
public static final String MENU_KEY_PREFIX = "MENU" + DELIMITER;
|
||||
public static final String ROLE_MENU_KEY_PREFIX = "ROLE_MENU" + DELIMITER;
|
||||
|
||||
/**
|
||||
* 字典缓存键前缀
|
||||
|
@@ -17,6 +17,7 @@
|
||||
package top.continew.admin.common.context;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import top.continew.admin.common.enums.DataScopeEnum;
|
||||
|
||||
import java.io.Serial;
|
||||
@@ -29,6 +30,7 @@ import java.io.Serializable;
|
||||
* @since 2023/3/7 22:08
|
||||
*/
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
public class RoleContext implements Serializable {
|
||||
|
||||
@Serial
|
||||
@@ -48,4 +50,10 @@ public class RoleContext implements Serializable {
|
||||
* 数据权限
|
||||
*/
|
||||
private DataScopeEnum dataScope;
|
||||
|
||||
public RoleContext(Long id, String code, DataScopeEnum dataScope) {
|
||||
this.id = id;
|
||||
this.code = code;
|
||||
this.dataScope = dataScope;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user