|
|
@@ -31,7 +31,8 @@ public class BytedanceController {
|
|
|
@Autowired
|
|
|
private IBytedanceProductReportService productReportService;
|
|
|
|
|
|
- private static final ExecutorService dailyRetrExecutorService = Executors.newFixedThreadPool(10);
|
|
|
+ private static final ExecutorService executor10Service1 = Executors.newFixedThreadPool(10);
|
|
|
+ private static final ExecutorService executor10Service2 = Executors.newFixedThreadPool(10);
|
|
|
|
|
|
@Autowired
|
|
|
private IAdminAdvertiserListService adminAdvertiserListService;
|
|
|
@@ -65,7 +66,7 @@ public class BytedanceController {
|
|
|
Long advertiserId = adminAdvertiserJson.getLong("advertiserId");
|
|
|
List<Long> ids = new ArrayList<>();
|
|
|
ids.add(advertiserId);
|
|
|
- dailyRetrExecutorService.submit(new Runnable() {
|
|
|
+ executor10Service1.submit(new Runnable() {
|
|
|
@Override
|
|
|
public void run() {
|
|
|
if (!Check.isNull(accessToken)) {
|
|
|
@@ -94,7 +95,7 @@ public class BytedanceController {
|
|
|
Long advertiserId = jsonObject.getLong("advertiserId");
|
|
|
String accessToken = jsonObject.getString("accessToken");
|
|
|
|
|
|
- dailyRetrExecutorService.submit(new Runnable() {
|
|
|
+ executor10Service1.submit(new Runnable() {
|
|
|
@Override
|
|
|
public void run() {
|
|
|
if (!Check.isNull(accessToken)) {
|
|
|
@@ -122,7 +123,7 @@ public class BytedanceController {
|
|
|
Long adverId = jsonObject.getLong("advertiserId");
|
|
|
String accessToken = jsonObject.getString("accessToken");
|
|
|
|
|
|
- dailyRetrExecutorService.submit(new Runnable() {
|
|
|
+ executor10Service1.submit(new Runnable() {
|
|
|
@Override
|
|
|
public void run() {
|
|
|
if (!Check.isNull(accessToken)) {
|
|
|
@@ -167,7 +168,7 @@ public class BytedanceController {
|
|
|
public void generateFlowDetailsReport(String startDate, String endDate) {
|
|
|
List<AdvertiserAccount> adAccount = byteDanceFlowDetailsReportService.getAdAccount();
|
|
|
adAccount.forEach(advertiserAccount -> {
|
|
|
- dailyRetrExecutorService.submit(new Runnable() {
|
|
|
+ executor10Service1.submit(new Runnable() {
|
|
|
|
|
|
@Override
|
|
|
public void run() {
|
|
|
@@ -187,7 +188,7 @@ public class BytedanceController {
|
|
|
public void costProject(@RequestParam(required = false) Long advertiserId, String startDate, String endDate) {
|
|
|
List<JSONObject> costAccount = productReportService.getCostAccount(advertiserId, startDate, endDate);
|
|
|
for (JSONObject jsonObject : costAccount) {
|
|
|
- dailyRetrExecutorService.submit(() -> {
|
|
|
+ executor10Service1.submit(() -> {
|
|
|
Long adverId = jsonObject.getLong("advertiserId");
|
|
|
cdpProjectService.getProjectList(adverId, null, null, null,null,1);
|
|
|
cdpProjectService.getProjectList(adverId, null, "del", null,null,1);
|
|
|
@@ -199,7 +200,7 @@ public class BytedanceController {
|
|
|
public void costPromotion(@RequestParam(required = false) Long advertiserId, String startDate, String endDate) {
|
|
|
List<JSONObject> costAccount = productReportService.getCostAccount(advertiserId, startDate, endDate);
|
|
|
for (JSONObject jsonObject : costAccount) {
|
|
|
- dailyRetrExecutorService.submit(() -> {
|
|
|
+ executor10Service2.submit(() -> {
|
|
|
Long adverId = jsonObject.getLong("advertiserId");
|
|
|
cdpProjectService.getPromotionList(adverId,null,null,null,1);
|
|
|
});
|
|
|
@@ -275,7 +276,7 @@ public class BytedanceController {
|
|
|
for (JSONObject iid : iids) {
|
|
|
Long pageId = iid.getLong("page_id");
|
|
|
Long advertiserId = iid.getLong("advertiser_id");
|
|
|
- dailyRetrExecutorService.submit(() -> cdpProjectService.getAdqWechatPages(advertiserId, pageId));
|
|
|
+ executor10Service1.submit(() -> cdpProjectService.getAdqWechatPages(advertiserId, pageId));
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -290,7 +291,7 @@ public class BytedanceController {
|
|
|
public void materialDaily(@RequestParam(required = false) Long advertiserId, String startDate, String endDate) {
|
|
|
List<JSONObject> costAccount = productReportService.getCostAccount(advertiserId, startDate, endDate);
|
|
|
for (JSONObject jsonObject : costAccount) {
|
|
|
- dailyRetrExecutorService.submit(() -> {
|
|
|
+ executor10Service1.submit(() -> {
|
|
|
Long adverId = jsonObject.getLong("advertiserId");
|
|
|
String accessToken = jsonObject.getString("accessToken");
|
|
|
bytedanceMaterialReportService.getBytedanceMaterialDailyReport(adverId, accessToken, startDate, endDate, 1, null, 1, 0);
|