|
@@ -2,6 +2,8 @@ package org.jeecg;
|
|
|
|
|
|
import cn.com.ctop.common.module.entity.CtopOauthToken;
|
|
|
import cn.com.ctop.common.module.service.ICtopOauthTokenService;
|
|
|
+import cn.com.ctop.common.module.service.IRefreshTokenService;
|
|
|
+import cn.com.ctop.kuaishou.modules.report.service.IKuaiShouDailyAgentService;
|
|
|
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.IByteDanceCreativeService;
|
|
@@ -23,28 +25,36 @@ public class SampleTest {
|
|
|
private ICtopOauthTokenService oauthTokenService;
|
|
|
@Autowired
|
|
|
private IByteDanceCreativeService creativeService;
|
|
|
- @Autowired
|
|
|
+ @Autowired
|
|
|
private IByteDanceCampaignService campaignService;
|
|
|
@Autowired
|
|
|
private IKuaishouReportDailyAgentService kuaishouReportDailyAgentService;
|
|
|
+ @Autowired
|
|
|
+ private IKuaiShouDailyAgentService kuaiShouDailyAgentService;
|
|
|
+ @Autowired
|
|
|
+ private IRefreshTokenService refreshTokenService;
|
|
|
|
|
|
@Test
|
|
|
public void loadBytedanceCreativeData() {
|
|
|
- CtopOauthToken token = oauthTokenService.getTokenByAccountId(1649600126891015L);
|
|
|
- creativeService.getAdvertiserCreative(token,null,null);
|
|
|
+
|
|
|
+ // refreshTokenService.getKuaiShouAgentRefresh();
|
|
|
+
|
|
|
+ String nowDate = DateUtils.getNowDate("yyyy-MM-dd");
|
|
|
+ String yesterday = DateUtils.getAnotherDay("yyyy-MM-dd", nowDate, -1);
|
|
|
+ kuaiShouDailyAgentService.getAgentReportByPage(nowDate, nowDate);
|
|
|
}
|
|
|
|
|
|
@Test
|
|
|
- public void testLoadBytedanceData(){
|
|
|
+ public void testLoadBytedanceData() {
|
|
|
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"));
|
|
|
+ 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"));
|
|
|
}
|
|
|
}
|
|
|
}
|