|
@@ -290,51 +290,35 @@ public class TestController {
|
|
oauthTokenQueryWrapper.eq("account_id", accountId);
|
|
oauthTokenQueryWrapper.eq("account_id", accountId);
|
|
oauthTokenQueryWrapper.last("limit 1");
|
|
oauthTokenQueryWrapper.last("limit 1");
|
|
CtopOauthToken token = oauthTokenMapper.selectOne(oauthTokenQueryWrapper);
|
|
CtopOauthToken token = oauthTokenMapper.selectOne(oauthTokenQueryWrapper);
|
|
- executorService.submit(new Runnable() {
|
|
|
|
- @Override
|
|
|
|
- public void run() {
|
|
|
|
- try {
|
|
|
|
-
|
|
|
|
- kuaishouInterfaceService.getCampaignList(token, null, null);
|
|
|
|
- //1:获取全量广告组数据
|
|
|
|
- kuaishouInterfaceService.getGroupList(token, null, null);
|
|
|
|
-
|
|
|
|
- Thread.sleep(1 * 200);
|
|
|
|
- } catch (Exception e) {
|
|
|
|
- e.printStackTrace();
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ try {
|
|
|
|
+ System.err.println("获取计划,广告组:" + accountId);
|
|
|
|
+ kuaishouInterfaceService.getCampaignList(token, null, null);
|
|
|
|
+ //1:获取全量广告组数据
|
|
|
|
+ kuaishouInterfaceService.getGroupList(token, null, null);
|
|
|
|
+ System.err.println("获取计划,广告组:" + accountId);
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
- @GetMapping(value = "/gerCreativeByAccount")
|
|
|
|
|
|
+ @GetMapping(value = "/getCreativeByAccount")
|
|
public void gerCreative(Long accountId) {
|
|
public void gerCreative(Long accountId) {
|
|
QueryWrapper<CtopOauthToken> oauthTokenQueryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<CtopOauthToken> oauthTokenQueryWrapper = new QueryWrapper<>();
|
|
oauthTokenQueryWrapper.eq("media_id", 2);
|
|
oauthTokenQueryWrapper.eq("media_id", 2);
|
|
oauthTokenQueryWrapper.eq("account_id", accountId);
|
|
oauthTokenQueryWrapper.eq("account_id", accountId);
|
|
oauthTokenQueryWrapper.last("limit 1");
|
|
oauthTokenQueryWrapper.last("limit 1");
|
|
CtopOauthToken token = oauthTokenMapper.selectOne(oauthTokenQueryWrapper);
|
|
CtopOauthToken token = oauthTokenMapper.selectOne(oauthTokenQueryWrapper);
|
|
- executorService.submit(new Runnable() {
|
|
|
|
- @Override
|
|
|
|
- public void run() {
|
|
|
|
- try {
|
|
|
|
- System.err.println("获取创意,accountId:" + token.getAccountId());
|
|
|
|
- // 1.计划数据
|
|
|
|
- kuaishouInterfaceService.getCampaignList(token, null, null);
|
|
|
|
- // 2:广告组数据
|
|
|
|
- kuaishouInterfaceService.getGroupList(token, null, null);
|
|
|
|
- // 3:创意数据
|
|
|
|
- kuaishouInterfaceService.getCreativeList(token, null, null);
|
|
|
|
|
|
|
|
- Thread.sleep(1 * 200);
|
|
|
|
- } catch (Exception e) {
|
|
|
|
- e.printStackTrace();
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ try {
|
|
|
|
+ System.err.println("获取创意,accountId:" + token.getAccountId());
|
|
|
|
+ kuaishouInterfaceService.getCreativeList(token, null, null);
|
|
|
|
+ System.err.println("获取创意结束,accountId:" + token.getAccountId());
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -357,8 +341,6 @@ public class TestController {
|
|
CtopOauthToken ctopOauthToken = oauthTokenMapper.selectOne(oauthTokenQueryWrapper);
|
|
CtopOauthToken ctopOauthToken = oauthTokenMapper.selectOne(oauthTokenQueryWrapper);
|
|
System.err.println("创意报表accountId:" + ctopOauthToken.getAccountId());
|
|
System.err.println("创意报表accountId:" + ctopOauthToken.getAccountId());
|
|
kuaishouInterfaceService.getAdvertiserCreativeReportDaily(ctopOauthToken, startDate, endDate);
|
|
kuaishouInterfaceService.getAdvertiserCreativeReportDaily(ctopOauthToken, startDate, endDate);
|
|
-
|
|
|
|
-
|
|
|
|
}
|
|
}
|
|
};
|
|
};
|
|
thread.start();
|
|
thread.start();
|