|
|
@@ -1,6 +1,8 @@
|
|
|
package com.moka.gdtauto.task;
|
|
|
|
|
|
import com.moka.gdtauto.service.DailyReportService;
|
|
|
+import com.tencent.ads.model.v3.TimeLine;
|
|
|
+
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import net.javacrumbs.shedlock.spring.annotation.SchedulerLock;
|
|
|
@@ -18,7 +20,7 @@ import java.time.format.DateTimeFormatter;
|
|
|
* @since 2026-03-03
|
|
|
*/
|
|
|
@Slf4j
|
|
|
-// @Component
|
|
|
+@Component
|
|
|
@RequiredArgsConstructor
|
|
|
public class DailyReportSyncTask {
|
|
|
|
|
|
@@ -38,7 +40,7 @@ public class DailyReportSyncTask {
|
|
|
String today = LocalDate.now().format(FMT);
|
|
|
log.info("[定时任务] 同步当日 REQUEST_TIME 日报表 date={}", today);
|
|
|
try {
|
|
|
- int total = dailyReportService.syncAllAccounts(today, today, "REQUEST_TIME");
|
|
|
+ int total = dailyReportService.syncAllAccounts(today, today, TimeLine.REQUEST_TIME.getValue());
|
|
|
log.info("[定时任务] 当日 REQUEST_TIME 日报表同步完成 total={}", total);
|
|
|
} catch (Exception e) {
|
|
|
log.error("[定时任务] 当日 REQUEST_TIME 日报表同步异常", e);
|
|
|
@@ -55,7 +57,7 @@ public class DailyReportSyncTask {
|
|
|
String today = LocalDate.now().format(FMT);
|
|
|
log.info("[定时任务] 同步当日 REPORTING_TIME 日报表 date={}", today);
|
|
|
try {
|
|
|
- int total = dailyReportService.syncAllAccounts(today, today, "REPORTING_TIME");
|
|
|
+ int total = dailyReportService.syncAllAccounts(today, today, TimeLine.REPORTING_TIME.getValue());
|
|
|
log.info("[定时任务] 当日 REPORTING_TIME 日报表同步完成 total={}", total);
|
|
|
} catch (Exception e) {
|
|
|
log.error("[定时任务] 当日 REPORTING_TIME 日报表同步异常", e);
|
|
|
@@ -74,7 +76,7 @@ public class DailyReportSyncTask {
|
|
|
String yesterday = LocalDate.now().minusDays(1).format(FMT);
|
|
|
log.info("[定时任务] 同步昨日 REQUEST_TIME 日报表 date={}", yesterday);
|
|
|
try {
|
|
|
- int total = dailyReportService.syncAllAccounts(yesterday, yesterday, "REQUEST_TIME");
|
|
|
+ int total = dailyReportService.syncAllAccounts(yesterday, yesterday, TimeLine.REQUEST_TIME.getValue());
|
|
|
log.info("[定时任务] 昨日 REQUEST_TIME 日报表同步完成 total={}", total);
|
|
|
} catch (Exception e) {
|
|
|
log.error("[定时任务] 昨日 REQUEST_TIME 日报表同步异常", e);
|
|
|
@@ -91,7 +93,7 @@ public class DailyReportSyncTask {
|
|
|
String yesterday = LocalDate.now().minusDays(1).format(FMT);
|
|
|
log.info("[定时任务] 同步昨日 REPORTING_TIME 日报表 date={}", yesterday);
|
|
|
try {
|
|
|
- int total = dailyReportService.syncAllAccounts(yesterday, yesterday, "REPORTING_TIME");
|
|
|
+ int total = dailyReportService.syncAllAccounts(yesterday, yesterday, TimeLine.REPORTING_TIME.getValue());
|
|
|
log.info("[定时任务] 昨日 REPORTING_TIME 日报表同步完成 total={}", total);
|
|
|
} catch (Exception e) {
|
|
|
log.error("[定时任务] 昨日 REPORTING_TIME 日报表同步异常", e);
|