|
@@ -56,15 +56,16 @@ public class SampleTest {
|
|
@Autowired
|
|
@Autowired
|
|
private IByteDanceAdvertiserDataService advertiserDataService;
|
|
private IByteDanceAdvertiserDataService advertiserDataService;
|
|
@Autowired
|
|
@Autowired
|
|
- private IKuaiShouHistoryReportTaskService kuaiShouHistoryReportTaskService;
|
|
|
|
- @Autowired
|
|
|
|
private ICtopOauthTokenService tokenService;
|
|
private ICtopOauthTokenService tokenService;
|
|
@Autowired
|
|
@Autowired
|
|
- private IKuaishouInterfaceService iKuaishouInterfaceService;
|
|
|
|
- @Autowired
|
|
|
|
private IKuaiShouVideoGetService videoGetService;
|
|
private IKuaiShouVideoGetService videoGetService;
|
|
@Autowired
|
|
@Autowired
|
|
private IKuaishouVideoRelateCreativesService kuaishouVideoRelateCreativesService;
|
|
private IKuaishouVideoRelateCreativesService kuaishouVideoRelateCreativesService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private IBindAccountLoginService bindAccountLoginService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private IKuaishouWebInterfaceService kuaishouWebInterfaceService;
|
|
|
|
+
|
|
|
|
|
|
@Test
|
|
@Test
|
|
public void loadBytedanceCreativeData() throws ParseException {
|
|
public void loadBytedanceCreativeData() throws ParseException {
|
|
@@ -91,21 +92,8 @@ public class SampleTest {
|
|
dateList.add(photoIds);
|
|
dateList.add(photoIds);
|
|
kuaishouVideoRelateCreativesService.videoRelateCreatives(9743746L, dateList, statdateMap);
|
|
kuaishouVideoRelateCreativesService.videoRelateCreatives(9743746L, dateList, statdateMap);
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
- /* QueryWrapper<CtopOauthToken> queryWrapper = new QueryWrapper<>();
|
|
|
|
- queryWrapper.eq("media_id", 2);
|
|
|
|
- List<CtopOauthToken> list = oauthTokenService.list(queryWrapper);
|
|
|
|
- for (CtopOauthToken token : list) {
|
|
|
|
- kuaiShouHistoryReportTaskService.createTask(token.getAccountId(), token.getAccessToken(), "2020-09-20", "2020-09-20", "daily");
|
|
|
|
- }*/
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- @Autowired
|
|
|
|
- private IBindAccountLoginService bindAccountLoginService;
|
|
|
|
- @Autowired
|
|
|
|
- private IKuaishouWebInterfaceService kuaishouWebInterfaceService;
|
|
|
|
-
|
|
|
|
@Test
|
|
@Test
|
|
public void loadKuaishouCookie() {
|
|
public void loadKuaishouCookie() {
|
|
List<BindAccountLogin> list = bindAccountLoginService.getListByParams(CtopAdConstant.PLATFORM_TYPE_KUAISHOU_PY, 1);
|
|
List<BindAccountLogin> list = bindAccountLoginService.getListByParams(CtopAdConstant.PLATFORM_TYPE_KUAISHOU_PY, 1);
|
|
@@ -401,26 +389,30 @@ public class SampleTest {
|
|
|
|
|
|
@Test
|
|
@Test
|
|
public void execute() {
|
|
public void execute() {
|
|
- String accountIds = "1675239584963662,1675237415468045";
|
|
|
|
|
|
+ String accountIds = "1679063493763085";
|
|
String[] arrays = accountIds.split(",");
|
|
String[] arrays = accountIds.split(",");
|
|
for (int i = 0; i < arrays.length; i++) {
|
|
for (int i = 0; i < arrays.length; i++) {
|
|
Long accountId = Long.parseLong(arrays[i]);
|
|
Long accountId = Long.parseLong(arrays[i]);
|
|
CtopOauthToken token = tokenService.getTokenByAccountId(accountId);
|
|
CtopOauthToken token = tokenService.getTokenByAccountId(accountId);
|
|
load12Data(token);
|
|
load12Data(token);
|
|
- load12AccountData(token);
|
|
|
|
|
|
+// load12AccountData(token);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
private void load12AccountData(CtopOauthToken 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);
|
|
|
|
|
|
+ reportService.getAdvertiserReport(token, DateUtils.parseDate("2020-10-01", "yyyy-MM-dd"), DateUtils.parseDate("2020-10-11", "yyyy-MM-dd"), CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
|
|
|
|
+ reportService.getAdvertiserReport(token, DateUtils.parseDate("2020-10-11", "yyyy-MM-dd"), DateUtils.parseDate("2020-10-21", "yyyy-MM-dd"), CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
|
|
|
|
+ reportService.getAdvertiserReport(token, DateUtils.parseDate("2020-10-21", "yyyy-MM-dd"), DateUtils.parseDate("2020-10-31", "yyyy-MM-dd"), CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
|
|
}
|
|
}
|
|
|
|
|
|
private void load12Data(CtopOauthToken token) {
|
|
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");
|
|
|
|
|
|
+// bytedanceReportService.bytedanceMaterialReport(token, "2020-10-01", "2020-10-05");
|
|
|
|
+// bytedanceReportService.bytedanceMaterialReport(token, "2020-10-06", "2020-10-10");
|
|
|
|
+// bytedanceReportService.bytedanceMaterialReport(token, "2020-10-11", "2020-10-15");
|
|
|
|
+// bytedanceReportService.bytedanceMaterialReport(token, "2020-10-16", "2020-10-20");
|
|
|
|
+// bytedanceReportService.bytedanceMaterialReport(token, "2020-10-21", "2020-10-25");
|
|
|
|
+// bytedanceReportService.bytedanceMaterialReport(token, "2020-10-26", "2020-10-31");
|
|
|
|
+ bytedanceReportService.bytedanceMaterialReport(token, "2020-10-03", "2020-10-04");
|
|
}
|
|
}
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
@@ -485,6 +477,19 @@ public class SampleTest {
|
|
}
|
|
}
|
|
|
|
|
|
@Test
|
|
@Test
|
|
|
|
+ public void testCreatePlan() {
|
|
|
|
+// List<AiKuaishouAccountTargetTemplate> accountTargetTemplates = aiKuaishouAccountTargetTemplateService.getAllEffectTemplate();
|
|
|
|
+// if (null == accountTargetTemplates || accountTargetTemplates.isEmpty()) {
|
|
|
|
+// return;
|
|
|
|
+// }
|
|
|
|
+ AiKuaishouAccountTargetTemplate accountTargetTemplate1 = aiKuaishouAccountTargetTemplateService.getById(30002);
|
|
|
|
+ aiKuaishouNewCreateCampaign.kuaishouAiAdsNewMaterialCreativity(accountTargetTemplate1);
|
|
|
|
+
|
|
|
|
+ AiKuaishouAccountTargetTemplate accountTargetTemplate2 = aiKuaishouAccountTargetTemplateService.getById(30001);
|
|
|
|
+ aiKuaishouNewCreateCampaign.kuaishouAiAdsNewMaterialCreativity(accountTargetTemplate2);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Test
|
|
public void etlKuaishouProjectData(){
|
|
public void etlKuaishouProjectData(){
|
|
String dateString = "2020-03-17";
|
|
String dateString = "2020-03-17";
|
|
Date startDate = DateUtils.parseDate(dateString,"yyyy-MM-dd");
|
|
Date startDate = DateUtils.parseDate(dateString,"yyyy-MM-dd");
|