|
@@ -15,7 +15,9 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
+import java.util.Arrays;
|
|
|
import java.util.Date;
|
|
|
+import java.util.List;
|
|
|
import java.util.concurrent.ExecutorService;
|
|
|
import java.util.concurrent.Executors;
|
|
|
|
|
@@ -52,18 +54,20 @@ public class BytedanceCampaignLoadJob {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- String token = tokenService.getByAccountId(Long.valueOf(param));
|
|
|
- if (Check.isNull(token)) {
|
|
|
- log.error("此账户未获取到相关token,accountId:{}", param);
|
|
|
- return;
|
|
|
- }
|
|
|
- //String nowDate = DateUtils.getNowDate("yyyy-MM-dd");
|
|
|
- //String yesterda = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -1);
|
|
|
-// String yesterda2 = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -2);
|
|
|
- OauthToken oauthToken = new OauthToken();
|
|
|
- oauthToken.setAccessToken(token);
|
|
|
- oauthToken.setAccountId(Long.parseLong(param));
|
|
|
- campaignDataService.getCampaignData(oauthToken, null,null,1, 1000);
|
|
|
+
|
|
|
+ String token = tokenService.getByAccountId(Long.valueOf(param));
|
|
|
+ if (Check.isNull(token)) {
|
|
|
+ log.error("此账户未获取到相关token,accountId:{}", param);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ String nowDate = DateUtils.getNowDate("yyyy-MM-dd");
|
|
|
+ String yesterda = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -1);
|
|
|
+ String yesterda2 = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -2);
|
|
|
+ OauthToken oauthToken = new OauthToken();
|
|
|
+ oauthToken.setAccessToken(token);
|
|
|
+ oauthToken.setAccountId(Long.parseLong(param));
|
|
|
+ campaignDataService.getCampaignData(oauthToken, yesterda2, yesterda, 1, 1000);
|
|
|
+
|
|
|
//campaignDataService.getCampaignData(oauthToken, yesterda,yesterda,1, 1000);
|
|
|
}
|
|
|
|