|
@@ -9,12 +9,12 @@ import cn.com.ctop.kuaishou.modules.batch.service.IKuaishouInterfaceService;
|
|
|
import cn.com.ctop.kuaishou.modules.graphql.service.IKuaishouWebInterfaceService;
|
|
|
import cn.com.ctop.kuaishou.modules.report.mapper.EtlKuaishouAccountMaterialReportDailyMapper;
|
|
|
import cn.com.ctop.kuaishou.modules.report.service.IKuaishouReportDailyImageService;
|
|
|
-import cn.com.ctop.oa.modules.service.IAppchatCreateService;
|
|
|
import cn.com.ctop.oa.modules.service.IWechatNoListService;
|
|
|
import cn.com.ctop.oa.modules.service.IWechatUserListService;
|
|
|
import cn.com.ctop.toutiao.modules.link.service.IETLReportBytedanceVideoService;
|
|
|
import cn.com.ctop.toutiao.modules.material.service.IByteDanceAdvertiserDataService;
|
|
|
import cn.com.ctop.toutiao.modules.material.service.IByteDanceCampaignService;
|
|
|
+import cn.com.ctop.toutiao.modules.report.entity.BytedanceCheckReportTaskInfo;
|
|
|
import cn.com.ctop.toutiao.modules.report.service.*;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.jeecg.common.util.DateUtils;
|
|
@@ -41,19 +41,45 @@ import java.util.concurrent.Executors;
|
|
|
@Slf4j
|
|
|
public class SampleTest {
|
|
|
@Autowired
|
|
|
+ private IBytedanceVideoEtlInfoService bytedanceVideoEtlInfoService;
|
|
|
+ @Autowired
|
|
|
+ IBytedanceVideoReportService bytedanceVideoReportService;
|
|
|
+ @Autowired
|
|
|
+ IETLReportBytedanceVideoService ietlReportBytedanceVideoService;
|
|
|
+ @Autowired
|
|
|
+ IKuaishouReportDailyImageService kuaishouReportDailyImageService;
|
|
|
+ @Autowired
|
|
|
+ IRuleByteDanceAccountService ruleByteDanceAccountService;
|
|
|
+ @Autowired
|
|
|
private ICtopOauthTokenService tokenService;
|
|
|
@Autowired
|
|
|
private IBindAccountLoginService bindAccountLoginService;
|
|
|
@Autowired
|
|
|
private IKuaishouWebInterfaceService kuaishouWebInterfaceService;
|
|
|
@Autowired
|
|
|
- private IKuaishouInterfaceService kuaishouInterfaceService;
|
|
|
+ private IWechatUserListService wechatUserInfoService;
|
|
|
+ @Autowired
|
|
|
+ private IByteDanceAdvertiserDataService advertiserDataService;
|
|
|
@Autowired
|
|
|
- private RedisUtil redisUtil;
|
|
|
+ private IWechatNoListService wechatNoListService;
|
|
|
@Autowired
|
|
|
- private IAppchatCreateService appchatCreateService;
|
|
|
+ private IETLReportBytedanceVideoService bytedanceVideoService;
|
|
|
@Autowired
|
|
|
- private IWechatUserListService wechatUserInfoService;
|
|
|
+ private IByteDanceVideoReportDailyService videoReportDailyService;
|
|
|
+ @Resource
|
|
|
+ private EtlKuaishouAccountMaterialReportDailyMapper etlKuaishouAccountMaterialReportDailyMapper;
|
|
|
+ @Autowired
|
|
|
+ private IByteDanceCampaignService campaignService;
|
|
|
+ @Autowired
|
|
|
+ private IReportService reportService;
|
|
|
+ @Resource
|
|
|
+ private IBytedanceCheckReportTaskInfoService checkReportTaskInfoService;
|
|
|
+ @Autowired
|
|
|
+ private IEtlBytedanceReportVideoDailyService etlBytedanceReportVideoDailyService;
|
|
|
+ // @Autowired
|
|
|
+ // private IAppchatCreateService appchatCreateService;
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
@Test
|
|
@@ -61,7 +87,7 @@ public class SampleTest {
|
|
|
wechatUserInfoService.getUserList();
|
|
|
|
|
|
// appchatCreateService.createAppChat(null, null, null);
|
|
|
- appchatCreateService.getChatInfo(null);
|
|
|
+// appchatCreateService.getChatInfo(null);
|
|
|
/* redisUtil.set("11sdfhgjksdhfjksdhfjksdhfkjsjkfhkjsddhfjksdhfkjhsjkfhjkshfjksdhfjksdhfjkshdjkfhsjkdfhkjsd1","hahahaha",5);
|
|
|
Object o = redisUtil.get("11sdfhgjksdhfjksdhfjksdhfkjsjkfhkjsddhfjksdhfkjhsjkfhjkshfjksdhfjksdhfjkshdjkfhsjkdfhkjsd1");
|
|
|
System.err.println(o);*/
|
|
@@ -102,11 +128,11 @@ public class SampleTest {
|
|
|
Date parse = dateFormat.parse("2021-04-02");
|
|
|
kuaishouInterfaceService.getAdvertiserReportDaily(tokenByAccountId, parse, parse, null);*/
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
static ExecutorService executorService = null;
|
|
|
static CountDownLatch countDownLatch = null;
|
|
|
|
|
|
+
|
|
|
+
|
|
|
@Test
|
|
|
public void deleteKuaishouComment() {
|
|
|
Long start = System.currentTimeMillis();
|
|
@@ -133,11 +159,6 @@ public class SampleTest {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @Autowired
|
|
|
- private IBytedanceReportService bytedanceReportService;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private IByteDanceAdvertiserDataService advertiserDataService;
|
|
|
|
|
|
@Test
|
|
|
public void loadBytedanceVideoReportData() {
|
|
@@ -145,10 +166,7 @@ public class SampleTest {
|
|
|
advertiserDataService.getMaterialList(token);
|
|
|
}
|
|
|
|
|
|
- @Autowired
|
|
|
- private IWechatNoListService wechatNoListService;
|
|
|
- @Autowired
|
|
|
- private IETLReportBytedanceVideoService bytedanceVideoService;
|
|
|
+
|
|
|
|
|
|
@Test
|
|
|
public void etlBytedanceVideoInfo() {
|
|
@@ -173,8 +191,6 @@ public class SampleTest {
|
|
|
}
|
|
|
|
|
|
|
|
|
- @Autowired
|
|
|
- private IByteDanceVideoReportDailyService videoReportDailyService;
|
|
|
|
|
|
@Test
|
|
|
public void formatVideoReportData() {
|
|
@@ -185,17 +201,6 @@ public class SampleTest {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @Autowired
|
|
|
- private IBytedanceVideoEtlInfoService bytedanceVideoEtlInfoService;
|
|
|
- @Autowired
|
|
|
- IBytedanceVideoReportService bytedanceVideoReportService;
|
|
|
- @Autowired
|
|
|
- IETLReportBytedanceVideoService ietlReportBytedanceVideoService;
|
|
|
- @Autowired
|
|
|
- IKuaishouReportDailyImageService kuaishouReportDailyImageService;
|
|
|
- @Autowired
|
|
|
- IRuleByteDanceAccountService ruleByteDanceAccountService;
|
|
|
-
|
|
|
@Test
|
|
|
public void loadBDAccoutData() {
|
|
|
Date startDate = DateUtils.addDay(new Date(), -2000);
|
|
@@ -205,16 +210,12 @@ public class SampleTest {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @Resource
|
|
|
- private EtlKuaishouAccountMaterialReportDailyMapper etlKuaishouAccountMaterialReportDailyMapper;
|
|
|
|
|
|
@Test
|
|
|
public void etlKuaishouVideoInfo() {
|
|
|
etlKuaishouAccountMaterialReportDailyMapper.etlKuaishouAccountMaterialReportDailyData(DateUtils.formatDate());
|
|
|
}
|
|
|
|
|
|
- @Autowired
|
|
|
- private IByteDanceCampaignService campaignService;
|
|
|
|
|
|
@Test
|
|
|
public void testLoadBytedanceCampaign() {
|
|
@@ -224,17 +225,12 @@ public class SampleTest {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- @Autowired
|
|
|
- private IEtlBytedanceReportVideoDailyService etlBytedanceReportVideoDailyService;
|
|
|
|
|
|
@Test
|
|
|
public void etlBytedanceVideoReportInfo() throws Exception {
|
|
|
etlBytedanceReportVideoDailyService.etlBytedanceVideo();
|
|
|
}
|
|
|
|
|
|
- @Autowired
|
|
|
- private IReportService reportService;
|
|
|
-
|
|
|
@Test
|
|
|
public void loadBytedanceAccountReport() {
|
|
|
/**
|
|
@@ -243,20 +239,22 @@ public class SampleTest {
|
|
|
* 1696734332089352
|
|
|
* 1696734333251598
|
|
|
*/
|
|
|
- CtopOauthToken token1 = tokenService.getTokenByAccountId(1692555408132110L);
|
|
|
- reportService.getAdvertiserReport(token1, DateUtils.parseDate("2021-05-01", "yyyy-MM-dd"), DateUtils.parseDate("2021-05-12", "yyyy-MM-dd"), CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
|
|
|
- CtopOauthToken token2 = tokenService.getTokenByAccountId(1692555631713287L);
|
|
|
- reportService.getAdvertiserReport(token2, DateUtils.parseDate("2021-05-01", "yyyy-MM-dd"), DateUtils.parseDate("2021-05-12", "yyyy-MM-dd"), CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
|
|
|
- CtopOauthToken token3 = tokenService.getTokenByAccountId(1696734332089352L);
|
|
|
- reportService.getAdvertiserReport(token3, DateUtils.parseDate("2021-05-01", "yyyy-MM-dd"), DateUtils.parseDate("2021-05-12", "yyyy-MM-dd"), CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
|
|
|
- CtopOauthToken token4 = tokenService.getTokenByAccountId(1696734333251598L);
|
|
|
- reportService.getAdvertiserReport(token4, DateUtils.parseDate("2021-05-01", "yyyy-MM-dd"), DateUtils.parseDate("2021-05-12", "yyyy-MM-dd"), CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
|
|
|
-
|
|
|
- CtopOauthToken token5 = tokenService.getTokenByAccountId(10129666L);
|
|
|
- kuaishouInterfaceService.getAdvertiserReportDaily(token5, DateUtils.parseDate("2021-05-07", "yyyy-MM-dd"), DateUtils.parseDate("2021-05-11", "yyyy-MM-dd"), null);
|
|
|
- CtopOauthToken token6 = tokenService.getTokenByAccountId(10097961L);
|
|
|
- kuaishouInterfaceService.getAdvertiserReportDaily(token6, DateUtils.parseDate("2021-05-07", "yyyy-MM-dd"), DateUtils.parseDate("2021-05-11", "yyyy-MM-dd"), null);
|
|
|
- CtopOauthToken token7 = tokenService.getTokenByAccountId(10098039L);
|
|
|
- kuaishouInterfaceService.getAdvertiserReportDaily(token7, DateUtils.parseDate("2021-05-07", "yyyy-MM-dd"), DateUtils.parseDate("2021-05-11", "yyyy-MM-dd"), null);
|
|
|
+ CtopOauthToken token1 = tokenService.getTokenByAccountId(1693648201498637L);
|
|
|
+ reportService.getAdvertiserReport(token1, DateUtils.parseDate("2021-04-01", "yyyy-MM-dd"), DateUtils.parseDate("2021-04-12", "yyyy-MM-dd"), CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Test
|
|
|
+ public void checkCostData(){
|
|
|
+ //1:初始化
|
|
|
+// checkReportTaskInfoService.initTask("2021-06-01");
|
|
|
+ //2: checkCost
|
|
|
+ List<BytedanceCheckReportTaskInfo>taskInfos = checkReportTaskInfoService.getListByParams(null,"2021-06-01");
|
|
|
+ if(null!=taskInfos&&!taskInfos.isEmpty()){
|
|
|
+ for (BytedanceCheckReportTaskInfo task:taskInfos) {
|
|
|
+ checkReportTaskInfoService.checkCost(task);
|
|
|
+ }
|
|
|
+ System.out.println("数据获取完成");
|
|
|
+ }
|
|
|
+ //3:重复异常数据
|
|
|
}
|
|
|
}
|