|
@@ -191,6 +191,34 @@ public class TestController {
|
|
thread.start();
|
|
thread.start();
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+ @GetMapping(value = "/getPlanAndGroupByAccount")
|
|
|
|
+ public void getPlanAndGroupByAccount(Long accountId) {
|
|
|
|
+ QueryWrapper<CtopOauthToken> oauthTokenQueryWrapper = new QueryWrapper<>();
|
|
|
|
+ oauthTokenQueryWrapper.eq("media_id", 2);
|
|
|
|
+ oauthTokenQueryWrapper.eq("account_id", accountId);
|
|
|
|
+ oauthTokenQueryWrapper.last("limit 1");
|
|
|
|
+ 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();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
@GetMapping(value = "/gerCreativeByAccount")
|
|
@GetMapping(value = "/gerCreativeByAccount")
|
|
public void gerCreative(Long accountId) {
|
|
public void gerCreative(Long accountId) {
|
|
QueryWrapper<CtopOauthToken> oauthTokenQueryWrapper = new QueryWrapper<>();
|
|
QueryWrapper<CtopOauthToken> oauthTokenQueryWrapper = new QueryWrapper<>();
|
|
@@ -203,12 +231,12 @@ public class TestController {
|
|
public void run() {
|
|
public void run() {
|
|
try {
|
|
try {
|
|
System.err.println("获取创意,accountId:" + token.getAccountId());
|
|
System.err.println("获取创意,accountId:" + token.getAccountId());
|
|
|
|
+ kuaishouInterfaceService.getCampaignList(token, null, null);
|
|
|
|
+ //1:获取全量广告组数据
|
|
|
|
+ kuaishouInterfaceService.getGroupList(token, null, null);
|
|
kuaishouInterfaceService.getCreativeList(token, null, null);
|
|
kuaishouInterfaceService.getCreativeList(token, null, null);
|
|
- // kuaishouInterfaceService.getVideoList2(token, null, null,1);
|
|
|
|
- //3: 获取图片信息数据
|
|
|
|
- // kuaishouInterfaceService.getImageList2(token, null, null,1);
|
|
|
|
|
|
+
|
|
Thread.sleep(1 * 200);
|
|
Thread.sleep(1 * 200);
|
|
- // kuaishouInterfaceService.getAppList(token.getAccountId(), token.getAccessToken());
|
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
}
|
|
}
|