|
@@ -3,8 +3,10 @@ package org.jeecg;
|
|
|
import cn.com.ctop.common.module.entity.BindAccountLogin;
|
|
|
import cn.com.ctop.common.module.entity.CtopOauthToken;
|
|
|
import cn.com.ctop.common.module.entity.UserAllocation;
|
|
|
-import cn.com.ctop.common.module.message.handle.impl.EmailSendMsgHandle;
|
|
|
-import cn.com.ctop.common.module.service.*;
|
|
|
+import cn.com.ctop.common.module.service.IBindAccountLoginService;
|
|
|
+import cn.com.ctop.common.module.service.ICtopOauthTokenService;
|
|
|
+import cn.com.ctop.common.module.service.ISendMessageService;
|
|
|
+import cn.com.ctop.common.module.service.IUserAllocationService;
|
|
|
import cn.com.ctop.common.module.utils.CtopAdConstant;
|
|
|
import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouDailyReportTaskService;
|
|
|
import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouHistoryReportTaskService;
|
|
@@ -15,13 +17,11 @@ import cn.com.ctop.kuaishou.modules.report.mapper.KuaishouAgentAccountMapper;
|
|
|
import cn.com.ctop.kuaishou.modules.report.service.IKuaishouReportDailyAgentService;
|
|
|
import cn.com.ctop.toutiao.modules.material.service.IByteDanceAdvertiserDataService;
|
|
|
import cn.com.ctop.toutiao.modules.report.service.IBytedanceFundDailyService;
|
|
|
-import cn.com.ctop.toutiao.modules.report.service.IBytedanceReportService;
|
|
|
import cn.com.ctop.toutiao.modules.report.service.IReportService;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.fasterxml.jackson.databind.DeserializationFeature;
|
|
|
import com.fasterxml.jackson.databind.JsonNode;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
-import com.xxl.job.core.log.XxlJobLogger;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.jeecg.common.util.DateUtils;
|
|
|
import org.junit.Test;
|
|
@@ -300,53 +300,4 @@ public class SampleTest {
|
|
|
}
|
|
|
// }
|
|
|
}
|
|
|
-
|
|
|
- @Autowired
|
|
|
- IUReportExportService uReportExportService;
|
|
|
- @Autowired
|
|
|
- EmailSendMsgHandle emailSendMsgHandle;
|
|
|
- @Autowired
|
|
|
- IUReportService uReportService;
|
|
|
-
|
|
|
- @Test
|
|
|
- public void loadBytedanceData(){
|
|
|
- List<CtopOauthToken> tokens = tokenService.selectToutiaoToken();
|
|
|
- for (int i=0;i<tokens.size();i++) {
|
|
|
- for(int j=0;j<4;j++){
|
|
|
- String getDate = DateUtils.formatDate(DateUtils.addDay(new Date(), -j));
|
|
|
- bytedanceReportService.bytedanceVideoMaterialReport(tokens.get(i), getDate, getDate);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private IBytedanceReportService bytedanceReportService;
|
|
|
- @Test
|
|
|
- public void loadMatData(){
|
|
|
- List<UserAllocation> allocations = allocationService.getByParams(289L,null,0);
|
|
|
- countDownLatch = new CountDownLatch(allocations.size());
|
|
|
- executorService = Executors.newFixedThreadPool(2);
|
|
|
- allocations.forEach(allocation -> {
|
|
|
- executorService.submit(new Runnable() {
|
|
|
- @Override
|
|
|
- public void run() {
|
|
|
- try {
|
|
|
- CtopOauthToken token = tokenService.getTokenByAccountId(allocation.getAccountId());
|
|
|
- //获取全量视频素材数据
|
|
|
- advertiserDataService.getMaterialList(token);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- } finally {
|
|
|
- countDownLatch.countDown();
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
- try {
|
|
|
- countDownLatch.await();
|
|
|
- } catch (InterruptedException e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- XxlJobLogger.log("物料数据同步完成");
|
|
|
- }
|
|
|
}
|