|
@@ -2,9 +2,10 @@ package org.jeecg;
|
|
|
|
|
|
import cn.com.ctop.common.module.entity.CtopOauthToken;
|
|
import cn.com.ctop.common.module.entity.CtopOauthToken;
|
|
import cn.com.ctop.common.module.service.ICtopOauthTokenService;
|
|
import cn.com.ctop.common.module.service.ICtopOauthTokenService;
|
|
|
|
+import cn.com.ctop.kuaishou.modules.report.service.IKuaishouReportDailyAgentService;
|
|
import cn.com.ctop.toutiao.modules.material.service.IByteDanceCampaignService;
|
|
import cn.com.ctop.toutiao.modules.material.service.IByteDanceCampaignService;
|
|
import cn.com.ctop.toutiao.modules.material.service.IByteDanceCreativeService;
|
|
import cn.com.ctop.toutiao.modules.material.service.IByteDanceCreativeService;
|
|
-import cn.com.ctop.toutiao.modules.report.service.IReportService;
|
|
|
|
|
|
+import org.jeecg.common.util.DateUtils;
|
|
import org.junit.Test;
|
|
import org.junit.Test;
|
|
import org.junit.runner.RunWith;
|
|
import org.junit.runner.RunWith;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -12,6 +13,8 @@ import org.springframework.boot.test.context.SpringBootTest;
|
|
import org.springframework.test.context.ActiveProfiles;
|
|
import org.springframework.test.context.ActiveProfiles;
|
|
import org.springframework.test.context.junit4.SpringRunner;
|
|
import org.springframework.test.context.junit4.SpringRunner;
|
|
|
|
|
|
|
|
+import java.util.Date;
|
|
|
|
+
|
|
@RunWith(SpringRunner.class)
|
|
@RunWith(SpringRunner.class)
|
|
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
|
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
|
@ActiveProfiles("wps")
|
|
@ActiveProfiles("wps")
|
|
@@ -19,11 +22,11 @@ public class SampleTest {
|
|
@Autowired
|
|
@Autowired
|
|
private ICtopOauthTokenService oauthTokenService;
|
|
private ICtopOauthTokenService oauthTokenService;
|
|
@Autowired
|
|
@Autowired
|
|
- private IReportService reportService;
|
|
|
|
- @Autowired
|
|
|
|
private IByteDanceCreativeService creativeService;
|
|
private IByteDanceCreativeService creativeService;
|
|
@Autowired
|
|
@Autowired
|
|
private IByteDanceCampaignService campaignService;
|
|
private IByteDanceCampaignService campaignService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private IKuaishouReportDailyAgentService kuaishouReportDailyAgentService;
|
|
|
|
|
|
@Test
|
|
@Test
|
|
public void loadBytedanceCreativeData() {
|
|
public void loadBytedanceCreativeData() {
|
|
@@ -36,4 +39,13 @@ public class SampleTest {
|
|
CtopOauthToken token = oauthTokenService.getTokenByAccountId(1673731621920840L);
|
|
CtopOauthToken token = oauthTokenService.getTokenByAccountId(1673731621920840L);
|
|
campaignService.getAdvertiserCampaign(token,null,null);
|
|
campaignService.getAdvertiserCampaign(token,null,null);
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @Test
|
|
|
|
+ public void loadKuaishouAgentData(){
|
|
|
|
+ for(int i=0;i<30;i++){
|
|
|
|
+ String currentDate = DateUtils.formatDate(DateUtils.addDay(new Date(),-i));
|
|
|
|
+ kuaishouReportDailyAgentService.getReport(currentDate,DateUtils.getNowDate("yyyy-MM-dd"));
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|