mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-09-11 06:57:12 +08:00
refactor: 重构仪表盘查询地域分析接口
This commit is contained in:
@@ -31,11 +31,15 @@ import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import top.continew.admin.common.constant.CacheConstants;
|
||||
import top.continew.admin.system.model.resp.dashboard.*;
|
||||
import top.continew.admin.system.model.resp.dashboard.DashboardAccessTrendResp;
|
||||
import top.continew.admin.system.model.resp.dashboard.DashboardChartCommonResp;
|
||||
import top.continew.admin.system.model.resp.dashboard.DashboardNoticeResp;
|
||||
import top.continew.admin.system.model.resp.dashboard.DashboardOverviewCommonResp;
|
||||
import top.continew.admin.system.service.DashboardService;
|
||||
import top.continew.starter.core.util.validate.ValidationUtils;
|
||||
import top.continew.starter.log.core.annotation.Log;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -72,6 +76,15 @@ public class DashboardController {
|
||||
return dashboardService.getOverviewIp();
|
||||
}
|
||||
|
||||
@Operation(summary = "查询地域分析", description = "查询地域分析")
|
||||
@GetMapping("/analysis/geo")
|
||||
@CachePenetrationProtect
|
||||
@CacheRefresh(refresh = 7200)
|
||||
@Cached(key = "'GEO'", name = CacheConstants.DASHBOARD_KEY_PREFIX, cacheType = CacheType.BOTH, syncLocal = true)
|
||||
public List<DashboardChartCommonResp> getAnalysisGeo() throws IOException {
|
||||
return dashboardService.getAnalysisGeo();
|
||||
}
|
||||
|
||||
@Operation(summary = "查询访问趋势信息", description = "查询访问趋势信息")
|
||||
@Parameter(name = "days", description = "日期数", example = "30", in = ParameterIn.PATH)
|
||||
@GetMapping("/access/trend/{days}")
|
||||
@@ -92,15 +105,6 @@ public class DashboardController {
|
||||
return dashboardService.getAnalysisTimeslot();
|
||||
}
|
||||
|
||||
@Operation(summary = "查询地域分析", description = "查询地域分析")
|
||||
@GetMapping("/analysis/geo")
|
||||
@CachePenetrationProtect
|
||||
@CacheRefresh(refresh = 7200)
|
||||
@Cached(key = "'GEO'", name = CacheConstants.DASHBOARD_KEY_PREFIX, cacheType = CacheType.BOTH, syncLocal = true)
|
||||
public List<DashboardChartCommonResp> getAnalysisGeo() {
|
||||
return dashboardService.getAnalysisGeo();
|
||||
}
|
||||
|
||||
@Operation(summary = "查询模块分析", description = "查询模块分析")
|
||||
@GetMapping("/analysis/module")
|
||||
@CachePenetrationProtect
|
||||
|
1
continew-webapi/src/main/resources/china.json
Normal file
1
continew-webapi/src/main/resources/china.json
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user