mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
1、组织套餐下的权限菜单id支持缓存、修改套餐内容或组织更换套餐时刷新对应缓存;2、增加组织套餐下菜单的过滤:登录系统展现菜单、接口权限串校验、角色管理给角色授权的可选菜单列表;
This commit is contained in:
+6
-3
@@ -41,12 +41,15 @@ public class TimeoutRedisCacheManager extends RedisCacheManager {
|
||||
// 核心:通过修改 cacheConfig 的过期时间,实现自定义过期时间
|
||||
if (cacheConfig != null) {
|
||||
// 移除 # 后面的 : 以及后面的内容,避免影响解析
|
||||
names[1] = CharSequenceUtil.subBefore(names[1], StrPool.COLON, false);
|
||||
String ttlStr = CharSequenceUtil.subBefore(names[1], StrPool.COLON, false); // 获得 ttlStr 时间部分
|
||||
names[1] = CharSequenceUtil.subAfter(names[1], ttlStr, false); // 移除掉 ttlStr 时间部分
|
||||
// 解析时间
|
||||
Duration duration = parseDuration(names[1]);
|
||||
Duration duration = parseDuration(ttlStr);
|
||||
cacheConfig = cacheConfig.entryTtl(duration);
|
||||
}
|
||||
return super.createRedisCache(name, cacheConfig);
|
||||
|
||||
// 创建 RedisCache 对象,需要忽略掉 ttlStr
|
||||
return super.createRedisCache(names[0] + names[1], cacheConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user