匹配新的rediskey前缀
This commit is contained in:
Vendored
+2
-8
@@ -1,6 +1,5 @@
|
||||
package xtools.app.common.cache.enums;
|
||||
|
||||
import xtools.app.common.config.AppCommonConfig;
|
||||
import xtools.boot.cache.redis.enums.BaseCacheEnum;
|
||||
import xtools.core.extend.TemplateUtils;
|
||||
|
||||
@@ -61,11 +60,6 @@ public enum AppCache implements BaseCacheEnum {
|
||||
// 系统日志按级别按天统计数
|
||||
COUNT_SYS_LOG("count:sys-log:{}:{}", 3 * 24 * 60 * 60L);
|
||||
|
||||
/**
|
||||
* 系统缓存前缀
|
||||
*/
|
||||
private final static String SYS_CACHE_PREFIX = AppCommonConfig.APP_CACHE_PREFIX;
|
||||
|
||||
/**
|
||||
* key
|
||||
*/
|
||||
@@ -94,7 +88,7 @@ public enum AppCache implements BaseCacheEnum {
|
||||
* @return 缓存 key
|
||||
*/
|
||||
public String key(Object... param) {
|
||||
return SYS_CACHE_PREFIX + TemplateUtils.format(key, param);
|
||||
return TemplateUtils.format(key, param);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -104,7 +98,7 @@ public enum AppCache implements BaseCacheEnum {
|
||||
*/
|
||||
@Override
|
||||
public String key() {
|
||||
return SYS_CACHE_PREFIX + key;
|
||||
return key;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
-5
@@ -18,9 +18,4 @@ public class AppCommonConfig {
|
||||
*/
|
||||
public static final String APP_SYS_LOG_ES_INDEX_NAME = "sys-log";
|
||||
|
||||
/**
|
||||
* 系统缓存前缀
|
||||
*/
|
||||
public final static String APP_CACHE_PREFIX = "xtools-app:";
|
||||
|
||||
}
|
||||
|
||||
+5
-4
@@ -33,11 +33,12 @@ public interface LogBusService {
|
||||
String total();
|
||||
|
||||
/**
|
||||
* 获取指定日期的日志统计数据(按级别,从Redis读取)
|
||||
* 获取指定日期的日志统计数据
|
||||
*
|
||||
* @param time 时间
|
||||
* @return 日志级别编码 -> 数量
|
||||
* @param time 时间
|
||||
* @param deleteKey 删除缓存
|
||||
* @return 统计数据
|
||||
*/
|
||||
Map<Integer, Long> getTotalByDay(Instant time);
|
||||
Map<Integer, Long> getTotalByDay(Instant time, boolean deleteKey);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user