|
@@ -7,7 +7,9 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import org.jeecg.common.api.vo.Result;
|
|
|
import org.jeecg.modules.adweb.common.util.DateUtil;
|
|
|
+import org.jeecg.modules.adweb.dmp.service.IGACountryReportService;
|
|
|
import org.jeecg.modules.adweb.dmp.service.IGAPagePathReportService;
|
|
|
+import org.jeecg.modules.adweb.dmp.vo.report.CountryStatsVO;
|
|
|
import org.jeecg.modules.adweb.dmp.vo.report.PagePathStatsVO;
|
|
|
import org.jeecg.modules.adweb.site.service.IAdwebSiteService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -33,6 +35,7 @@ public class GADataController {
|
|
|
|
|
|
@Autowired private IAdwebSiteService adwebSiteService;
|
|
|
|
|
|
+ @Autowired private IGACountryReportService gaCountryReportService;
|
|
|
@Autowired private IGAPagePathReportService gaPagePathReportService;
|
|
|
|
|
|
// /** 网站流量分析统计 */
|
|
@@ -54,12 +57,11 @@ public class GADataController {
|
|
|
// }
|
|
|
|
|
|
@GetMapping("/country/stats")
|
|
|
- public Result<List<PagePathStatsVO>> getCountryStats(
|
|
|
+ public Result<List<CountryStatsVO>> getCountryStats(
|
|
|
String siteCode,
|
|
|
String dateType,
|
|
|
@DateTimeFormat(pattern = "yyyy-MM-dd") Date start,
|
|
|
- @DateTimeFormat(pattern = "yyyy-MM-dd") Date end,
|
|
|
- int limit) {
|
|
|
+ @DateTimeFormat(pattern = "yyyy-MM-dd") Date end) {
|
|
|
// 1. 计算时间区间
|
|
|
if (StringUtils.isNotBlank(dateType)) {
|
|
|
Map<String, Date> dateRange = DateUtil.getDateRangeByType(dateType);
|
|
@@ -68,13 +70,9 @@ public class GADataController {
|
|
|
}
|
|
|
|
|
|
// 2. 查询并返回
|
|
|
- return Result.ok(
|
|
|
- gaPagePathReportService.getPagePathStats(
|
|
|
- siteCode, start, end, limit >= 0 ? limit : 10));
|
|
|
+ return Result.ok(gaCountryReportService.getCountryStats(siteCode, start, end));
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
@GetMapping("/page-path/stats")
|
|
|
public Result<List<PagePathStatsVO>> getPagePathStats(
|
|
|
String siteCode,
|