|
@@ -7,7 +7,6 @@ import cn.com.ctop.job.bytedance.data.mapper.AccountReportNewMapper;
|
|
|
import cn.com.ctop.job.bytedance.data.service.IBytedanceReportNewService;
|
|
import cn.com.ctop.job.bytedance.data.service.IBytedanceReportNewService;
|
|
|
import cn.com.ctop.job.bytedance.data.utils.Check;
|
|
import cn.com.ctop.job.bytedance.data.utils.Check;
|
|
|
import cn.com.ctop.job.bytedance.data.utils.HttpUtils;
|
|
import cn.com.ctop.job.bytedance.data.utils.HttpUtils;
|
|
|
-import cn.com.ctop.job.bytedance.data.utils.RateLimitUtil;
|
|
|
|
|
import cn.com.ctop.job.bytedance.utils.FieldsConfig;
|
|
import cn.com.ctop.job.bytedance.utils.FieldsConfig;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
@@ -22,8 +21,7 @@ import java.util.*;
|
|
|
public class BytedanceReportNewServiceImpl implements IBytedanceReportNewService {
|
|
public class BytedanceReportNewServiceImpl implements IBytedanceReportNewService {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private AccountReportNewMapper accountReportNewMapper;
|
|
private AccountReportNewMapper accountReportNewMapper;
|
|
|
- @Autowired
|
|
|
|
|
- private RateLimitUtil rateLimitUtil;
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
private String urlPath = "http://192.168.0.85:8765/webhook/bytedance_account_report";
|
|
private String urlPath = "http://192.168.0.85:8765/webhook/bytedance_account_report";
|
|
|
private static JSONArray metrics = new JSONArray();
|
|
private static JSONArray metrics = new JSONArray();
|
|
@@ -47,9 +45,9 @@ public class BytedanceReportNewServiceImpl implements IBytedanceReportNewService
|
|
|
Map<String, String> headers = new HashMap<>();
|
|
Map<String, String> headers = new HashMap<>();
|
|
|
headers.put("Access-Token", accessToken);
|
|
headers.put("Access-Token", accessToken);
|
|
|
String s = null;
|
|
String s = null;
|
|
|
- if (rateLimitUtil.acquire("1635316529903624", url)) {
|
|
|
|
|
|
|
+ /* if (rateLimitUtil.acquire("1635316529903624", url)) {*/
|
|
|
s = HttpUtils.httpGet(url, paramsMap, headers);
|
|
s = HttpUtils.httpGet(url, paramsMap, headers);
|
|
|
- }
|
|
|
|
|
|
|
+ /* }*/
|
|
|
|
|
|
|
|
|
|
|
|
|
JSONObject result = JSONObject.parseObject(s);
|
|
JSONObject result = JSONObject.parseObject(s);
|
|
@@ -155,9 +153,9 @@ public class BytedanceReportNewServiceImpl implements IBytedanceReportNewService
|
|
|
Map<String, String> headers = new HashMap<>();
|
|
Map<String, String> headers = new HashMap<>();
|
|
|
headers.put("Access-Token", oauthToken);
|
|
headers.put("Access-Token", oauthToken);
|
|
|
String s = null;
|
|
String s = null;
|
|
|
- if (rateLimitUtil.acquire("1635316529903624", url)) {
|
|
|
|
|
|
|
+ /* if (rateLimitUtil.acquire("1635316529903624", url)) {*/
|
|
|
s = HttpUtils.httpGet(url, paramsMap, headers);
|
|
s = HttpUtils.httpGet(url, paramsMap, headers);
|
|
|
- }
|
|
|
|
|
|
|
+ /* }*/
|
|
|
JSONObject result = JSONObject.parseObject(s);
|
|
JSONObject result = JSONObject.parseObject(s);
|
|
|
List<BytedanceAdvertiserReportDaily> dailies = new ArrayList<>();
|
|
List<BytedanceAdvertiserReportDaily> dailies = new ArrayList<>();
|
|
|
Integer code = result.getInteger("code");
|
|
Integer code = result.getInteger("code");
|