|
@@ -371,14 +371,43 @@ public class SampleTest {
|
|
|
|
|
|
@Test
|
|
|
public void execute() {
|
|
|
- CtopOauthToken token = tokenService.getTokenByAccountId(9589905L);
|
|
|
- ruleKuaiShouPlanService.cleanRuleDataTarget(token.getAccountId(), 1);
|
|
|
+ String accountIds = "1675239584963662,1676540490482759,1675237415468045";
|
|
|
+ String[] arrays = accountIds.split(",");
|
|
|
+ for(int i=0;i<arrays.length;i++){
|
|
|
+ Long accountId = Long.parseLong(arrays[i]);
|
|
|
+ CtopOauthToken token = tokenService.getTokenByAccountId(accountId);
|
|
|
+ load12Data(token);
|
|
|
+ load12AccountData(token);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @Test
|
|
|
+ public void loadBytedanceData(){
|
|
|
+ String accountIds = "1676540490482759";
|
|
|
+ String[] arrays = accountIds.split(",");
|
|
|
+ for(int i=0;i<arrays.length;i++){
|
|
|
+ Long accountId = Long.parseLong(arrays[i]);
|
|
|
+ CtopOauthToken token = tokenService.getTokenByAccountId(accountId);
|
|
|
+ load12Data(token);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private void load12AccountData(CtopOauthToken token){
|
|
|
+ reportService.getAdvertiserReport(token, DateUtils.parseDate("2020-12-01","yyyy-MM-dd"), DateUtils.parseDate("2020-12-11","yyyy-MM-dd"),CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
|
|
|
+ reportService.getAdvertiserReport(token, DateUtils.parseDate("2020-12-11","yyyy-MM-dd"), DateUtils.parseDate("2020-12-21","yyyy-MM-dd"),CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
|
|
|
+ reportService.getAdvertiserReport(token, DateUtils.parseDate("2020-12-21","yyyy-MM-dd"), DateUtils.parseDate("2020-12-31","yyyy-MM-dd"),CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
|
|
|
+ }
|
|
|
+
|
|
|
+ private void load12Data(CtopOauthToken token){
|
|
|
+ bytedanceReportService.bytedanceMaterialReport(token, "2020-12-01", "2020-12-11");
|
|
|
+ bytedanceReportService.bytedanceMaterialReport(token, "2020-12-11", "2020-12-21");
|
|
|
+ bytedanceReportService.bytedanceMaterialReport(token, "2020-12-21", "2020-12-31");
|
|
|
}
|
|
|
@Autowired
|
|
|
private IKuaishouVideoEtlInfoService kuaishouVideoEtlInfoService;
|
|
|
@Test
|
|
|
public void etlKuaishouData(){
|
|
|
- String dateString = "2020-12-25";
|
|
|
+ String dateString = "2020-12-31";
|
|
|
Date startDate = DateUtils.parseDate(dateString,"yyyy-MM-dd");
|
|
|
for(int i=0;i<=10;i++){
|
|
|
Date getDate = DateUtils.addDay(startDate,i);
|
|
@@ -389,16 +418,6 @@ public class SampleTest {
|
|
|
|
|
|
@Autowired
|
|
|
private IBytedanceVideoEtlInfoService bytedanceVideoEtlInfoService;
|
|
|
- @Test
|
|
|
- public void etlBytedanceData(){
|
|
|
- String dateString = "2020-12-23";
|
|
|
- Date startDate = DateUtils.parseDate(dateString,"yyyy-MM-dd");
|
|
|
- for(int i=0;i<=10;i++){
|
|
|
- Date getDate = DateUtils.addDay(startDate,i);
|
|
|
- bytedanceVideoEtlInfoService.etlBytedanceVideoInfo(getDate);
|
|
|
- kuaishouVideoEtlInfoService.etlKuaishouVideoInfo(getDate);
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
@Test
|
|
|
public void loadBytedanceVideo(){
|