|
@@ -624,4 +624,38 @@ public class TestController {
|
|
|
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+ @GetMapping(value = "/AccountReportByAccount")
|
|
|
+ public void AccountReportByAccount(Long accountId, String startDateStr, String endDateStr) {
|
|
|
+ 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 {
|
|
|
+ SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
+ Date startDate = null;
|
|
|
+ Date endDate = null;
|
|
|
+ try {
|
|
|
+ startDate = simpleDateFormat.parse(startDateStr);
|
|
|
+ endDate = simpleDateFormat.parse(endDateStr);
|
|
|
+ } catch (ParseException e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ System.err.println("获取广告主报表,accountId:" + token.getAccountId());
|
|
|
+ kuaishouInterfaceService.getAdvertiserReportDaily(token, startDate, endDate);
|
|
|
+
|
|
|
+ Thread.sleep(1 * 200);
|
|
|
+ // kuaishouInterfaceService.getAppList(token.getAccountId(), token.getAccessToken());
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
}
|