package org.jeecg; import cn.com.ctop.common.module.entity.CtopOauthToken; 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.IByteDanceCreativeService; import org.jeecg.common.util.DateUtils; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.junit4.SpringRunner; import java.util.Date; @RunWith(SpringRunner.class) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) @ActiveProfiles("wps") public class SampleTest { @Autowired private ICtopOauthTokenService oauthTokenService; @Autowired private IByteDanceCreativeService creativeService; @Autowired private IByteDanceCampaignService campaignService; @Autowired private IKuaishouReportDailyAgentService kuaishouReportDailyAgentService; @Test public void loadBytedanceCreativeData() { CtopOauthToken token = oauthTokenService.getTokenByAccountId(1649600126891015L); creativeService.getAdvertiserCreative(token,null,null); } @Test public void testLoadBytedanceData(){ CtopOauthToken token = oauthTokenService.getTokenByAccountId(1673731621920840L); 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")); } } }