|
@@ -15,6 +15,7 @@ import cn.com.ctop.common.module.utils.CtopAdConstant;
|
|
|
import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouHistoryReportTaskService;
|
|
|
import cn.com.ctop.kuaishou.modules.graphql.service.IKuaishouWebInterfaceService;
|
|
|
import cn.com.ctop.kuaishou.modules.report.service.IKuaishouReportDailyAgentService;
|
|
|
+import cn.com.ctop.oa.modules.service.IWechatCheckinDataService;
|
|
|
import cn.com.ctop.toutiao.modules.report.service.IReportService;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -48,19 +49,18 @@ public class SampleTest {
|
|
|
private IKuaiShouHistoryReportTaskService kuaiShouHistoryReportTaskService;
|
|
|
@Autowired
|
|
|
private IMaterialImageInfoService imageInfoService;
|
|
|
+ @Autowired
|
|
|
+ private IWechatCheckinDataService wechatCheckinDataService;
|
|
|
+
|
|
|
@Test
|
|
|
- public void loadBytedanceMatData(){
|
|
|
- executorService = Executors.newFixedThreadPool(5);
|
|
|
- List<CtopOauthToken> tokens = oauthTokenService.selectToutiaoToken();
|
|
|
- for (CtopOauthToken token:tokens) {
|
|
|
- reportService.getAdvertiserPlanReport(token,new Date(),new Date(),CtopAdConstant.BYTEDANCE_REPORT_TYPE_HOURLY);
|
|
|
- }
|
|
|
+ public void loadBytedanceMatData() {
|
|
|
+ wechatCheckinDataService.getCheckinData();
|
|
|
}
|
|
|
|
|
|
@Test
|
|
|
- public void initImageCode(){
|
|
|
+ public void initImageCode() {
|
|
|
List<MaterialImageInfo> imageInfos = imageInfoService.list();
|
|
|
- for (MaterialImageInfo image:imageInfos) {
|
|
|
+ for (MaterialImageInfo image : imageInfos) {
|
|
|
imageInfoService.initImageCode(image);
|
|
|
}
|
|
|
}
|
|
@@ -71,10 +71,10 @@ public class SampleTest {
|
|
|
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");
|
|
|
+ for (CtopOauthToken token : list) {
|
|
|
+ kuaiShouHistoryReportTaskService.createTask(token.getAccountId(), token.getAccessToken(), "2020-09-20", "2020-09-20", "daily");
|
|
|
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
|
|
@@ -189,11 +189,11 @@ public class SampleTest {
|
|
|
}
|
|
|
|
|
|
@Test
|
|
|
- public void testBytedanceVideoReport(){
|
|
|
+ public void testBytedanceVideoReport() {
|
|
|
List<CtopOauthToken> tokens = oauthTokenService.selectToutiaoToken();
|
|
|
- for(int i=2;i<100;i++){
|
|
|
- String date = DateUtils.formatDate(DateUtils.addDay(new Date(),-i));
|
|
|
- for (CtopOauthToken token:tokens) {
|
|
|
+ for (int i = 2; i < 100; i++) {
|
|
|
+ String date = DateUtils.formatDate(DateUtils.addDay(new Date(), -i));
|
|
|
+ for (CtopOauthToken token : tokens) {
|
|
|
// bytedanceReportService.bytedanceVideoMaterialReport(token, date, date);
|
|
|
}
|
|
|
}
|