|
|
@@ -47,40 +47,37 @@ public class AdqController {
|
|
|
|
|
|
@GetMapping("/testCreativeHour")
|
|
|
public JSONObject testRefreshToken(Long advertiserId, String accessToken, String date) {
|
|
|
- // accountReportService.getAdqAccountHour(advertiserId, accessToken, "2025-03-28", date, 1, 1);
|
|
|
+ // accountReportService.getAdqAccountHour(advertiserId, accessToken, "2025-03-28", date, 1, 1);
|
|
|
accountReportService.getAdqAccountDaily(advertiserId, accessToken, "2025-03-27", date, 1, 1);
|
|
|
- // adqReportService.getAdqCreativeDaily(advertiserId, accessToken, "2025-03-27", date, 1, 1);
|
|
|
+ // adqReportService.getAdqCreativeDaily(advertiserId, accessToken, "2025-03-27", date, 1, 1);
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
|
|
|
@GetMapping("/testCreativeDaily")
|
|
|
- public JSONObject testCreativeDaily() {
|
|
|
- List<JSONObject> accountList = adqReportService.getErrorLogs();
|
|
|
+ public void testCreativeDaily() {
|
|
|
+
|
|
|
+ List<JSONObject> accountList = adqReportService.getAccountList(null);
|
|
|
if (!Check.isNull(accountList)) {
|
|
|
for (int i = 0; i < accountList.size(); i++) {
|
|
|
JSONObject jsonObject = accountList.get(i);
|
|
|
- Long id = jsonObject.getLong("id");
|
|
|
Long advertiserId = jsonObject.getLong("advertiserId");
|
|
|
- String startDate = jsonObject.getString("startDate");
|
|
|
- String endDate = jsonObject.getString("endDate");
|
|
|
- String dataDimension = jsonObject.getString("dataDimension");
|
|
|
- String dataType = jsonObject.getString("dataType");
|
|
|
- String accessToken = jsonObject.getString("accessToken");
|
|
|
|
|
|
- if ("creative".equals(dataDimension)) {
|
|
|
- if (dataType.equals("hour")) { // 广告时报
|
|
|
- retryReportService.getCreativeHourRetry(id, advertiserId, accessToken, startDate, endDate, 1, 2);
|
|
|
- }
|
|
|
- if (dataType.equals("daily")) { // 广告日报
|
|
|
- retryReportService.getCreativeDailyRetry(id, advertiserId, accessToken, startDate, endDate, 1, 2);
|
|
|
+ String accessToken = jsonObject.getString("accessToken");
|
|
|
+ dailyExecutorService.submit(new Runnable() {
|
|
|
+ @Override
|
|
|
+ public void run() {
|
|
|
+ accountReportService.getAdqAccountDaily(advertiserId, accessToken, "2025-05-01", "2025-05-11", 1, 1);
|
|
|
+ adqReportService.getAdqCreativeDaily(advertiserId, accessToken, "2025-05-01", "2025-05-11", 1, 1);
|
|
|
}
|
|
|
- }
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
- return null;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
@GetMapping("/getList")
|
|
|
public JSONObject getList() {
|
|
|
|
|
|
@@ -111,7 +108,7 @@ public class AdqController {
|
|
|
|
|
|
@Override
|
|
|
public void run() {
|
|
|
- if(!Check.isNull(advertiserAccount.getAccessToken())){
|
|
|
+ if (!Check.isNull(advertiserAccount.getAccessToken())) {
|
|
|
adqFlowDetailsReportService.getAdqFlowDetailsDailyReport(advertiserAccount.getAdvertiserId(), advertiserAccount.getAccessToken(), startDateString, startDateString, 1, null);
|
|
|
}
|
|
|
}
|