1、组织套餐下的权限菜单id支持缓存、修改套餐内容或组织更换套餐时刷新对应缓存;2、增加组织套餐下菜单的过滤:登录系统展现菜单、接口权限串校验、角色管理给角色授权的可选菜单列表;

This commit is contained in:
gaoqr
2024-11-05 14:38:34 +08:00
parent e16583e3a8
commit eadb7f7633
16 changed files with 216 additions and 41 deletions
@@ -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);
}
/**