|
@@ -144,6 +144,7 @@ public class BytedanceReportRetryJob {
|
|
|
|
|
|
|
|
List<JSONObject> changDuRetry = channelService.getChangDuRetry();
|
|
List<JSONObject> changDuRetry = channelService.getChangDuRetry();
|
|
|
if (!Check.isNull(changDuRetry)) {
|
|
if (!Check.isNull(changDuRetry)) {
|
|
|
|
|
+ ExecutorService executorService = Executors.newFixedThreadPool(2);
|
|
|
for (int i = 0; i < changDuRetry.size(); i++) {
|
|
for (int i = 0; i < changDuRetry.size(); i++) {
|
|
|
JSONObject jsonObject = changDuRetry.get(i);
|
|
JSONObject jsonObject = changDuRetry.get(i);
|
|
|
Long id = jsonObject.getLong("id");
|
|
Long id = jsonObject.getLong("id");
|
|
@@ -157,7 +158,12 @@ public class BytedanceReportRetryJob {
|
|
|
String appId = jsonObject.getString("channelAppId");
|
|
String appId = jsonObject.getString("channelAppId");
|
|
|
String appName = jsonObject.getString("channelAppName");
|
|
String appName = jsonObject.getString("channelAppName");
|
|
|
if ("changdu_order".equals(dataDimension)) {
|
|
if ("changdu_order".equals(dataDimension)) {
|
|
|
- channelService.getOrderList(startDate, endDate, appId, appName, channelAccountId, secretKey, 1, id, isSend);
|
|
|
|
|
|
|
+ executorService.submit(new Runnable() {
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void run() {
|
|
|
|
|
+ channelService.getOrderList(startDate, endDate, appId, appName, channelAccountId, secretKey, 1, id, isSend);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
@@ -166,6 +172,7 @@ public class BytedanceReportRetryJob {
|
|
|
|
|
|
|
|
List<JSONObject> maEcpmRetryJob = miniAppService.getMaEcpmRetryJob();
|
|
List<JSONObject> maEcpmRetryJob = miniAppService.getMaEcpmRetryJob();
|
|
|
if (!Check.isNull(maEcpmRetryJob)) {
|
|
if (!Check.isNull(maEcpmRetryJob)) {
|
|
|
|
|
+ ExecutorService executorService = Executors.newFixedThreadPool(2);
|
|
|
for (int i = 0; i < maEcpmRetryJob.size(); i++) {
|
|
for (int i = 0; i < maEcpmRetryJob.size(); i++) {
|
|
|
JSONObject jsonObject = maEcpmRetryJob.get(i);
|
|
JSONObject jsonObject = maEcpmRetryJob.get(i);
|
|
|
Long id = jsonObject.getLong("id");
|
|
Long id = jsonObject.getLong("id");
|
|
@@ -175,7 +182,12 @@ public class BytedanceReportRetryJob {
|
|
|
Integer isSend = jsonObject.getInteger("isSend");
|
|
Integer isSend = jsonObject.getInteger("isSend");
|
|
|
if (dataDimension != null && dataDimension.startsWith("ma_ecpm:")) {
|
|
if (dataDimension != null && dataDimension.startsWith("ma_ecpm:")) {
|
|
|
String appId = dataDimension.split(":")[1];
|
|
String appId = dataDimension.split(":")[1];
|
|
|
- miniAppService.getMaEcpm(startDate, endDate, appId, 1, id, isSend);
|
|
|
|
|
|
|
+ executorService.submit(new Runnable() {
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void run() {
|
|
|
|
|
+ miniAppService.getMaEcpm(startDate, endDate, appId, 1, id, isSend);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
@@ -184,6 +196,7 @@ public class BytedanceReportRetryJob {
|
|
|
|
|
|
|
|
List<JSONObject> xingTuRetryJob = bytedanceXingTuService.getXingTuRetryJob();
|
|
List<JSONObject> xingTuRetryJob = bytedanceXingTuService.getXingTuRetryJob();
|
|
|
if (!Check.isNull(xingTuRetryJob)) {
|
|
if (!Check.isNull(xingTuRetryJob)) {
|
|
|
|
|
+ ExecutorService executorService = Executors.newFixedThreadPool(2);
|
|
|
for (int i = 0; i < xingTuRetryJob.size(); i++) {
|
|
for (int i = 0; i < xingTuRetryJob.size(); i++) {
|
|
|
JSONObject jsonObject = xingTuRetryJob.get(i);
|
|
JSONObject jsonObject = xingTuRetryJob.get(i);
|
|
|
Long id = jsonObject.getLong("id");
|
|
Long id = jsonObject.getLong("id");
|
|
@@ -196,11 +209,26 @@ public class BytedanceReportRetryJob {
|
|
|
Long taskId = jsonObject.getJSONObject("msg").getLong("taskId");
|
|
Long taskId = jsonObject.getJSONObject("msg").getLong("taskId");
|
|
|
|
|
|
|
|
if ("xingtu_task_list".equalsIgnoreCase(dataDimension)) {
|
|
if ("xingtu_task_list".equalsIgnoreCase(dataDimension)) {
|
|
|
- bytedanceXingTuService.getXingTuTaskList(advertiserId, accessToken, startDate, endDate, 1, id, null, isSend);
|
|
|
|
|
|
|
+ executorService.submit(new Runnable() {
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void run() {
|
|
|
|
|
+ bytedanceXingTuService.getXingTuTaskList(advertiserId, accessToken, startDate, endDate, 1, id, null, isSend);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
} else if ("xingtu_task_info".equalsIgnoreCase(dataDimension)) {
|
|
} else if ("xingtu_task_info".equalsIgnoreCase(dataDimension)) {
|
|
|
- bytedanceXingTuService.getXingTuTaskInfo(advertiserId, taskId, accessToken, id, null, isSend);
|
|
|
|
|
|
|
+ executorService.submit(new Runnable() {
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void run() {
|
|
|
|
|
+ bytedanceXingTuService.getXingTuTaskInfo(advertiserId, taskId, accessToken, id, null, isSend);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
} else if ("xingtu_task_report".equalsIgnoreCase(dataDimension)) {
|
|
} else if ("xingtu_task_report".equalsIgnoreCase(dataDimension)) {
|
|
|
- bytedanceXingTuService.getXingTuTaskReport(advertiserId, taskId, accessToken, 1, id, null, isSend);
|
|
|
|
|
|
|
+ executorService.submit(new Runnable() {
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void run() {
|
|
|
|
|
+ bytedanceXingTuService.getXingTuTaskReport(advertiserId, taskId, accessToken, 1, id, null, isSend);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|