【7.1.6】【statistics】整理

pull/26/MERGE
fengshuonan 2022-02-10 22:21:11 +08:00
parent 06ee603e38
commit 95793512fb
6 changed files with 26 additions and 26 deletions

View File

@ -12,9 +12,9 @@ import java.util.Map;
* @author xixiaowei
* @date 2022/2/9 16:36
*/
public class InterfaceStatisticsMemoryCache extends AbstractMemoryCacheOperator<Map<Long,Integer>> {
public class InterfaceStatisticsMemoryCache extends AbstractMemoryCacheOperator<Map<Long, Integer>> {
public InterfaceStatisticsMemoryCache(TimedCache<String, Map<Long,Integer>> timedCache) {
public InterfaceStatisticsMemoryCache(TimedCache<String, Map<Long, Integer>> timedCache) {
super(timedCache);
}

View File

@ -12,9 +12,9 @@ import java.util.Map;
* @author xixiaowei
* @date 2022/2/9 16:38
*/
public class InterfaceStatisticsRedisCache extends AbstractRedisCacheOperator<Map<Long,Integer>> {
public class InterfaceStatisticsRedisCache extends AbstractRedisCacheOperator<Map<Long, Integer>> {
public InterfaceStatisticsRedisCache(RedisTemplate<String, Map<Long,Integer>> redisTemplate) {
public InterfaceStatisticsRedisCache(RedisTemplate<String, Map<Long, Integer>> redisTemplate) {
super(redisTemplate);
}

View File

@ -31,7 +31,7 @@ public class StatisticsUrlContext implements CommandLineRunner {
/**
* urlkeyurlvaluestat_url_id
*/
private static Map<String,Long> STATISTICS_KEY_VALUES = new HashMap<>(10);
private static Map<String, Long> STATISTICS_KEY_VALUES = new HashMap<>(10);
/**
* url
@ -39,7 +39,7 @@ public class StatisticsUrlContext implements CommandLineRunner {
* @author fengshuonan
* @date 2022/2/10 21:37
*/
public static List<SysStatisticsUrl> getUrls(){
public static List<SysStatisticsUrl> getUrls() {
return STATISTICS_URLS;
}
@ -49,7 +49,7 @@ public class StatisticsUrlContext implements CommandLineRunner {
* @author fengshuonan
* @date 2022/2/10 21:37
*/
public static Long getStatUrlId(String url){
public static Long getStatUrlId(String url) {
return STATISTICS_KEY_VALUES.get(url);
}
@ -63,7 +63,7 @@ public class StatisticsUrlContext implements CommandLineRunner {
public void run(String... args) throws Exception {
STATISTICS_URLS = sysStatisticsUrlService.list();
for (SysStatisticsUrl statisticsUrl : STATISTICS_URLS) {
STATISTICS_KEY_VALUES.put(statisticsUrl.getStatUrl(),statisticsUrl.getStatUrlId());
STATISTICS_KEY_VALUES.put(statisticsUrl.getStatUrl(), statisticsUrl.getStatUrlId());
}
}