|
|
@@ -3,6 +3,7 @@ package cn.com.ctop.job.adq.handler;
|
|
|
|
|
|
import cn.com.ctop.job.adq.data.service.*;
|
|
|
import cn.com.ctop.job.adq.data.utils.Check;
|
|
|
+import cn.com.ctop.job.adq.data.utils.DateUtils;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.xxl.job.core.handler.annotation.XxlJob;
|
|
|
@@ -34,6 +35,7 @@ public class AdqRetryReportJob {
|
|
|
|
|
|
private static ExecutorService flowExecutorService = Executors.newFixedThreadPool(2);
|
|
|
|
|
|
+ private static ExecutorService dailyExecutorService = Executors.newFixedThreadPool(5);
|
|
|
|
|
|
@Autowired
|
|
|
private IAdqCreativeReportService adqReportService;
|
|
|
@@ -45,6 +47,8 @@ public class AdqRetryReportJob {
|
|
|
private IAdqAdIncomeService adqAdIncomeService;
|
|
|
@Autowired
|
|
|
private IAdqFlowDetailsReportService adqFlowDetailsReportService;
|
|
|
+ @Autowired
|
|
|
+ private IAdqAccountReportService accountReportService;
|
|
|
|
|
|
@XxlJob("adqRetryReport")
|
|
|
public void promoterReport() throws Exception {
|
|
|
@@ -178,43 +182,40 @@ public class AdqRetryReportJob {
|
|
|
|
|
|
|
|
|
@XxlJob("updateAdqAccountStatus")
|
|
|
- public void updateAdqAccountStatus() {
|
|
|
+ public void updateAdqAccountStatus() {
|
|
|
retryReportService.updateAdqAccountStatus();
|
|
|
}
|
|
|
|
|
|
@XxlJob("updateClAccountStatus")
|
|
|
- public void updateClAccountStatus() {
|
|
|
+ public void updateClAccountStatus() {
|
|
|
retryReportService.updateClAccountStatus();
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
- /*@XxlJob("getLtv3Data")
|
|
|
- public JSONObject getReport() {
|
|
|
- List<JSONObject> dataJson = adqReportService.getAccountListByDate(20250425, 20250630);
|
|
|
+ @XxlJob("getLtv3Data")
|
|
|
+ public void getLtv3Data() {
|
|
|
+ String nowDate = DateUtils.getNowDate("yyyy-MM-dd");
|
|
|
+ String endDateStr = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -1);
|
|
|
+ String startDateStr = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -4);
|
|
|
+ Integer startDate = Integer.valueOf(startDateStr.replace("-", ""));
|
|
|
+ Integer endDate = Integer.valueOf(endDateStr.replace("-", ""));
|
|
|
+ List<JSONObject> dataJson = adqReportService.getAccountListByDate(startDate, endDate);
|
|
|
if (!Check.isNull(dataJson)) {
|
|
|
for (int i = 0; i < dataJson.size(); i++) {
|
|
|
JSONObject jsonObject = dataJson.get(i);
|
|
|
-
|
|
|
Long advertiserId = jsonObject.getLong("advertiserId");
|
|
|
String accessToken = jsonObject.getString("accessToken");
|
|
|
- // dailyExecutorService.submit(new Runnable() {
|
|
|
+ dailyExecutorService.submit(new Runnable() {
|
|
|
@Override
|
|
|
public void run() {
|
|
|
- adqReportService.getAdqCreativeDaily(advertiserId, accessToken, "2025-04-25", "2025-06-30", 1, 1);
|
|
|
- accountReportService.getAdqAccountDaily(advertiserId, accessToken, "2025-04-25", "2025-06-30", 1, 1);
|
|
|
+ adqReportService.getAdqCreativeDaily(advertiserId, accessToken, startDateStr, endDateStr, 1, 1);
|
|
|
+ accountReportService.getAdqAccountDaily(advertiserId, accessToken, startDateStr, endDateStr, 1, 1);
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
|
|
|
}
|
|
|
-
|
|
|
- return null;
|
|
|
-
|
|
|
- }*/
|
|
|
+ }
|
|
|
|
|
|
|
|
|
}
|