|
@@ -7,11 +7,16 @@ import cn.com.ctop.common.module.entity.BindAccountLogin;
|
|
import cn.com.ctop.common.module.entity.CtopOauthToken;
|
|
import cn.com.ctop.common.module.entity.CtopOauthToken;
|
|
import cn.com.ctop.common.module.entity.UserAllocation;
|
|
import cn.com.ctop.common.module.entity.UserAllocation;
|
|
import cn.com.ctop.common.module.message.handle.impl.EmailSendMsgHandle;
|
|
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.IUReportExportService;
|
|
|
|
+import cn.com.ctop.common.module.service.IUReportService;
|
|
|
|
+import cn.com.ctop.common.module.service.IUserAllocationService;
|
|
import cn.com.ctop.common.module.utils.CtopAdConstant;
|
|
import cn.com.ctop.common.module.utils.CtopAdConstant;
|
|
import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouHistoryReportTaskService;
|
|
import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouHistoryReportTaskService;
|
|
import cn.com.ctop.kuaishou.modules.graphql.service.IKuaishouWebInterfaceService;
|
|
import cn.com.ctop.kuaishou.modules.graphql.service.IKuaishouWebInterfaceService;
|
|
import cn.com.ctop.kuaishou.modules.report.service.IKuaishouReportDailyAgentService;
|
|
import cn.com.ctop.kuaishou.modules.report.service.IKuaishouReportDailyAgentService;
|
|
|
|
+import cn.com.ctop.kuaishou.modules.report.service.IKuaishouZombieCreativeService;
|
|
import cn.com.ctop.toutiao.modules.material.service.IByteDanceAdvertiserDataService;
|
|
import cn.com.ctop.toutiao.modules.material.service.IByteDanceAdvertiserDataService;
|
|
import cn.com.ctop.toutiao.modules.report.service.IByteDanceVideoReportDailyService;
|
|
import cn.com.ctop.toutiao.modules.report.service.IByteDanceVideoReportDailyService;
|
|
import cn.com.ctop.toutiao.modules.report.service.IBytedanceReportService;
|
|
import cn.com.ctop.toutiao.modules.report.service.IBytedanceReportService;
|
|
@@ -173,11 +178,11 @@ public class SampleTest {
|
|
public void loadAccountData() {
|
|
public void loadAccountData() {
|
|
// List<UserAllocation> allocations = allocationService.getByParams(776L,null,0);
|
|
// List<UserAllocation> allocations = allocationService.getByParams(776L,null,0);
|
|
// for (UserAllocation allocation:allocations) {
|
|
// for (UserAllocation allocation:allocations) {
|
|
- CtopOauthToken token = tokenService.getTokenByAccountId(93238965516L);
|
|
|
|
- for(int i=92;i<100;i++){
|
|
|
|
- Date getDate = DateUtils.addDay(new Date(),-i);
|
|
|
|
- reportService.getAdvertiserReport(token, getDate, getDate, CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
|
|
|
|
- }
|
|
|
|
|
|
+ CtopOauthToken token = tokenService.getTokenByAccountId(93238965516L);
|
|
|
|
+ for (int i = 92; i < 100; i++) {
|
|
|
|
+ Date getDate = DateUtils.addDay(new Date(), -i);
|
|
|
|
+ reportService.getAdvertiserReport(token, getDate, getDate, CtopAdConstant.BYTEDANCE_REPORT_TYPE_DAILY);
|
|
|
|
+ }
|
|
// }
|
|
// }
|
|
}
|
|
}
|
|
|
|
|
|
@@ -189,10 +194,10 @@ public class SampleTest {
|
|
IUReportService uReportService;
|
|
IUReportService uReportService;
|
|
|
|
|
|
@Test
|
|
@Test
|
|
- public void loadBytedanceData(){
|
|
|
|
|
|
+ public void loadBytedanceData() {
|
|
List<CtopOauthToken> tokens = tokenService.selectToutiaoToken();
|
|
List<CtopOauthToken> tokens = tokenService.selectToutiaoToken();
|
|
- for (CtopOauthToken token:tokens) {
|
|
|
|
- for(int i=0;i<20;i++){
|
|
|
|
|
|
+ for (CtopOauthToken token : tokens) {
|
|
|
|
+ for (int i = 0; i < 20; i++) {
|
|
Date getDate = DateUtils.addDay(new Date(), -i);
|
|
Date getDate = DateUtils.addDay(new Date(), -i);
|
|
String date = DateUtils.formatDate(getDate);
|
|
String date = DateUtils.formatDate(getDate);
|
|
bytedanceReportService.bytedanceMaterialReport(token, date, date);
|
|
bytedanceReportService.bytedanceMaterialReport(token, date, date);
|
|
@@ -202,16 +207,16 @@ public class SampleTest {
|
|
}
|
|
}
|
|
|
|
|
|
@Test
|
|
@Test
|
|
- public void loaddata(){
|
|
|
|
|
|
+ public void loaddata() {
|
|
// List<UserAllocation> allocations = allocationService.getByParams(643L,null,0);
|
|
// List<UserAllocation> allocations = allocationService.getByParams(643L,null,0);
|
|
// for (UserAllocation allocation:allocations) {
|
|
// for (UserAllocation allocation:allocations) {
|
|
- for(int i=0;i<50;i++){
|
|
|
|
|
|
+ for (int i = 0; i < 50; i++) {
|
|
// CtopOauthToken token = tokenService.getTokenByAccountId(allocation.getAccountId());
|
|
// CtopOauthToken token = tokenService.getTokenByAccountId(allocation.getAccountId());
|
|
- Date getDate = DateUtils.addDay(new Date(), -i);
|
|
|
|
- String date = DateUtils.formatDate(getDate);
|
|
|
|
|
|
+ Date getDate = DateUtils.addDay(new Date(), -i);
|
|
|
|
+ String date = DateUtils.formatDate(getDate);
|
|
// bytedanceReportService.bytedanceMaterialReport(token, date, date);
|
|
// bytedanceReportService.bytedanceMaterialReport(token, date, date);
|
|
- videoReportDailyService.videoInfoList(date, date);
|
|
|
|
- }
|
|
|
|
|
|
+ videoReportDailyService.videoInfoList(date, date);
|
|
|
|
+ }
|
|
|
|
|
|
// }
|
|
// }
|
|
}
|
|
}
|
|
@@ -221,9 +226,10 @@ public class SampleTest {
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
private IByteDanceVideoReportDailyService videoReportDailyService;
|
|
private IByteDanceVideoReportDailyService videoReportDailyService;
|
|
|
|
+
|
|
@Test
|
|
@Test
|
|
- public void loadMatData(){
|
|
|
|
- List<UserAllocation> allocations = allocationService.getByParams(320L,null,0);
|
|
|
|
|
|
+ public void loadMatData() {
|
|
|
|
+ List<UserAllocation> allocations = allocationService.getByParams(320L, null, 0);
|
|
countDownLatch = new CountDownLatch(allocations.size());
|
|
countDownLatch = new CountDownLatch(allocations.size());
|
|
executorService = Executors.newFixedThreadPool(2);
|
|
executorService = Executors.newFixedThreadPool(2);
|
|
allocations.forEach(allocation -> {
|
|
allocations.forEach(allocation -> {
|
|
@@ -249,4 +255,12 @@ public class SampleTest {
|
|
}
|
|
}
|
|
XxlJobLogger.log("物料数据同步完成");
|
|
XxlJobLogger.log("物料数据同步完成");
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private IKuaishouZombieCreativeService kuaishouZombieCreativeService;
|
|
|
|
+
|
|
|
|
+ @Test
|
|
|
|
+ public void checkZombieProject() {
|
|
|
|
+ kuaishouZombieCreativeService.checkZombieProject();
|
|
|
|
+ }
|
|
}
|
|
}
|