|
@@ -32,6 +32,9 @@ public class TestController {
|
|
@Autowired
|
|
@Autowired
|
|
private IKuaishouWebInterfaceService kuaishouWebInterfaceService;
|
|
private IKuaishouWebInterfaceService kuaishouWebInterfaceService;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private CtopOauthTokenMapper oauthTokenMapper;
|
|
|
|
+
|
|
@PostMapping(value = "/create")
|
|
@PostMapping(value = "/create")
|
|
public Map<String, Object> authorization(@RequestBody JSONObject jsonObject) {
|
|
public Map<String, Object> authorization(@RequestBody JSONObject jsonObject) {
|
|
return createInternalService.createInternal(jsonObject);
|
|
return createInternalService.createInternal(jsonObject);
|
|
@@ -122,8 +125,7 @@ public class TestController {
|
|
return "Success";
|
|
return "Success";
|
|
}
|
|
}
|
|
|
|
|
|
- @Autowired
|
|
|
|
- private CtopOauthTokenMapper oauthTokenMapper;
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
@GetMapping(value = "/gerCreative")
|
|
@GetMapping(value = "/gerCreative")
|
|
@@ -184,6 +186,39 @@ public class TestController {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ @GetMapping(value = "/gerCreativeByAccount")
|
|
|
|
+ public void gerCreative(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 {
|
|
|
|
+ System.err.println("获取创意,accountId:" + token.getAccountId());
|
|
|
|
+ kuaishouInterfaceService.getCreativeList(token, null, null);
|
|
|
|
+ // kuaishouInterfaceService.getVideoList2(token, null, null,1);
|
|
|
|
+ //3: 获取图片信息数据
|
|
|
|
+ // kuaishouInterfaceService.getImageList2(token, null, null,1);
|
|
|
|
+ Thread.sleep(1 * 200);
|
|
|
|
+ // kuaishouInterfaceService.getAppList(token.getAccountId(), token.getAccessToken());
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
@GetMapping(value = "/gerCreativeReportByAccount")
|
|
@GetMapping(value = "/gerCreativeReportByAccount")
|
|
public void gerCreativeReportByAccount(Long accountId, String startDateStr, String endDateStr, QueryWrapper<CtopOauthToken> account_id) {
|
|
public void gerCreativeReportByAccount(Long accountId, String startDateStr, String endDateStr, QueryWrapper<CtopOauthToken> account_id) {
|
|
Thread thread = new Thread() {
|
|
Thread thread = new Thread() {
|