|
@@ -37,7 +37,7 @@ import java.util.stream.Collectors;
|
|
|
public class DMPDataController {
|
|
|
|
|
|
@Value("${v3.dmp.realtimeReport}")
|
|
|
- private boolean realtimeReport;
|
|
|
+ private boolean realtimeReport; // 实时报表开关,true-从DataBridge实时读取 false-从DB离线读取
|
|
|
|
|
|
@Autowired private IGADailyReportService gaDailyReportService;
|
|
|
@Autowired private IGACountryReportService gaCountryReportService;
|
|
@@ -98,10 +98,11 @@ public class DMPDataController {
|
|
|
}
|
|
|
|
|
|
// 2. TODO: 实时或DB离线查询
|
|
|
- return Result.ok(
|
|
|
+ List<CountryStatsVO> countryStatsVOs =
|
|
|
realtimeReport
|
|
|
? realtimeReportService.getCountryStats(siteCode, start, end)
|
|
|
- : gaCountryReportService.getCountryStats(siteCode, start, end));
|
|
|
+ : gaCountryReportService.getCountryStats(siteCode, start, end);
|
|
|
+ return Result.ok(countryStatsVOs);
|
|
|
}
|
|
|
|
|
|
@GetMapping("/source-medium/stats")
|
|
@@ -118,10 +119,11 @@ public class DMPDataController {
|
|
|
}
|
|
|
|
|
|
// 2. TODO: 实时或DB离线查询
|
|
|
- return Result.ok(
|
|
|
+ List<SourceMediumStatsVO> sourceMediumStatsVOs =
|
|
|
realtimeReport
|
|
|
? realtimeReportService.getSourceMediumStats(siteCode, start, end)
|
|
|
- : gaSourceMediumReportService.getSourceMediumStats(siteCode, start, end));
|
|
|
+ : gaSourceMediumReportService.getSourceMediumStats(siteCode, start, end);
|
|
|
+ return Result.ok(sourceMediumStatsVOs);
|
|
|
}
|
|
|
|
|
|
@GetMapping("/page-path/stats")
|
|
@@ -140,10 +142,11 @@ public class DMPDataController {
|
|
|
|
|
|
// 2. TODO: 实时或DB离线查询
|
|
|
limit = limit >= 0 ? limit : 10;
|
|
|
- return Result.ok(
|
|
|
+ List<PagePathStatsVO> pagePathStatsVOs =
|
|
|
realtimeReport
|
|
|
? realtimeReportService.getPagePathStats(siteCode, start, end, limit)
|
|
|
- : gaPagePathReportService.getPagePathStats(siteCode, start, end, limit));
|
|
|
+ : gaPagePathReportService.getPagePathStats(siteCode, start, end, limit);
|
|
|
+ return Result.ok(pagePathStatsVOs);
|
|
|
}
|
|
|
|
|
|
@GetMapping("/device/stats")
|
|
@@ -160,10 +163,11 @@ public class DMPDataController {
|
|
|
}
|
|
|
|
|
|
// 2. TODO: 实时或DB离线查询
|
|
|
- return Result.ok(
|
|
|
+ List<DeviceStatsVO> deviceStatsVOs =
|
|
|
realtimeReport
|
|
|
? realtimeReportService.getDeviceStats(siteCode, start, end)
|
|
|
- : gaDeviceReportService.getDeviceStats(siteCode, start, end));
|
|
|
+ : gaDeviceReportService.getDeviceStats(siteCode, start, end);
|
|
|
+ return Result.ok(deviceStatsVOs);
|
|
|
}
|
|
|
|
|
|
@GetMapping("/enquiry-country/stats")
|