mirror of https://gitee.com/stylefeng/roses
【7.1.6】【statistics】整理
parent
06ee603e38
commit
95793512fb
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ public class StatisticsUrlContext implements CommandLineRunner {
|
|||
/**
|
||||
* 需要被统计的url集合,key是url,value是stat_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());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ public enum SysStatisticsUrlExceptionEnum implements AbstractExceptionEnum {
|
|||
/**
|
||||
* 查询结果不存在
|
||||
*/
|
||||
SYS_STATISTICS_URL_NOT_EXISTED(RuleConstants.USER_OPERATION_ERROR_TYPE_CODE + "10001", "查询结果不存在");
|
||||
SYS_STATISTICS_URL_NOT_EXISTED(RuleConstants.USER_OPERATION_ERROR_TYPE_CODE + "10001", "查询结果不存在");
|
||||
|
||||
/**
|
||||
* 错误编码
|
||||
|
@ -33,4 +33,4 @@ public enum SysStatisticsUrlExceptionEnum implements AbstractExceptionEnum {
|
|||
this.userTip = userTip;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ import java.util.List;
|
|||
*/
|
||||
public interface SysStatisticsCountService extends IService<SysStatisticsCount> {
|
||||
|
||||
/**
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param sysStatisticsCountRequest 请求参数
|
||||
|
@ -24,7 +24,7 @@ public interface SysStatisticsCountService extends IService<SysStatisticsCount>
|
|||
*/
|
||||
void add(SysStatisticsCountRequest sysStatisticsCountRequest);
|
||||
|
||||
/**
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param sysStatisticsCountRequest 请求参数
|
||||
|
@ -33,7 +33,7 @@ public interface SysStatisticsCountService extends IService<SysStatisticsCount>
|
|||
*/
|
||||
void del(SysStatisticsCountRequest sysStatisticsCountRequest);
|
||||
|
||||
/**
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param sysStatisticsCountRequest 请求参数
|
||||
|
@ -42,7 +42,7 @@ public interface SysStatisticsCountService extends IService<SysStatisticsCount>
|
|||
*/
|
||||
void edit(SysStatisticsCountRequest sysStatisticsCountRequest);
|
||||
|
||||
/**
|
||||
/**
|
||||
* 查询详情
|
||||
*
|
||||
* @param sysStatisticsCountRequest 请求参数
|
||||
|
@ -51,20 +51,20 @@ public interface SysStatisticsCountService extends IService<SysStatisticsCount>
|
|||
*/
|
||||
SysStatisticsCount detail(SysStatisticsCountRequest sysStatisticsCountRequest);
|
||||
|
||||
/**
|
||||
/**
|
||||
* 获取列表
|
||||
*
|
||||
* @param sysStatisticsCountRequest 请求参数
|
||||
* @param sysStatisticsCountRequest 请求参数
|
||||
* @return List<SysStatisticsCount> 返回结果
|
||||
* @author fengshuonan
|
||||
* @date 2022/02/10 21:17
|
||||
*/
|
||||
List<SysStatisticsCount> findList(SysStatisticsCountRequest sysStatisticsCountRequest);
|
||||
|
||||
/**
|
||||
/**
|
||||
* 获取列表(带分页)
|
||||
*
|
||||
* @param sysStatisticsCountRequest 请求参数
|
||||
* @param sysStatisticsCountRequest 请求参数
|
||||
* @return PageResult<SysStatisticsCount> 返回结果
|
||||
* @author fengshuonan
|
||||
* @date 2022/02/10 21:17
|
||||
|
|
|
@ -15,7 +15,7 @@ import java.util.List;
|
|||
*/
|
||||
public interface SysStatisticsUrlService extends IService<SysStatisticsUrl> {
|
||||
|
||||
/**
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
* @param sysStatisticsUrlRequest 请求参数
|
||||
|
@ -24,7 +24,7 @@ public interface SysStatisticsUrlService extends IService<SysStatisticsUrl> {
|
|||
*/
|
||||
void add(SysStatisticsUrlRequest sysStatisticsUrlRequest);
|
||||
|
||||
/**
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param sysStatisticsUrlRequest 请求参数
|
||||
|
@ -33,7 +33,7 @@ public interface SysStatisticsUrlService extends IService<SysStatisticsUrl> {
|
|||
*/
|
||||
void del(SysStatisticsUrlRequest sysStatisticsUrlRequest);
|
||||
|
||||
/**
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param sysStatisticsUrlRequest 请求参数
|
||||
|
@ -42,7 +42,7 @@ public interface SysStatisticsUrlService extends IService<SysStatisticsUrl> {
|
|||
*/
|
||||
void edit(SysStatisticsUrlRequest sysStatisticsUrlRequest);
|
||||
|
||||
/**
|
||||
/**
|
||||
* 查询详情
|
||||
*
|
||||
* @param sysStatisticsUrlRequest 请求参数
|
||||
|
@ -51,20 +51,20 @@ public interface SysStatisticsUrlService extends IService<SysStatisticsUrl> {
|
|||
*/
|
||||
SysStatisticsUrl detail(SysStatisticsUrlRequest sysStatisticsUrlRequest);
|
||||
|
||||
/**
|
||||
/**
|
||||
* 获取列表
|
||||
*
|
||||
* @param sysStatisticsUrlRequest 请求参数
|
||||
* @param sysStatisticsUrlRequest 请求参数
|
||||
* @return List<SysStatisticsUrl> 返回结果
|
||||
* @author fengshuonan
|
||||
* @date 2022/02/10 21:17
|
||||
*/
|
||||
List<SysStatisticsUrl> findList(SysStatisticsUrlRequest sysStatisticsUrlRequest);
|
||||
|
||||
/**
|
||||
/**
|
||||
* 获取列表(带分页)
|
||||
*
|
||||
* @param sysStatisticsUrlRequest 请求参数
|
||||
* @param sysStatisticsUrlRequest 请求参数
|
||||
* @return PageResult<SysStatisticsUrl> 返回结果
|
||||
* @author fengshuonan
|
||||
* @date 2022/02/10 21:17
|
||||
|
|
Loading…
Reference in New Issue