|
@@ -86,7 +86,7 @@ public class KuaishouAccountBudgetServiceImpl extends ServiceImpl<KuaishouAccoun
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|
|
- public JSONObject getAccountBudget(CtopOauthToken oauthToken) throws InterruptedException {
|
|
|
|
|
|
+ public JSONObject getAccountBudget(CtopOauthToken oauthToken) {
|
|
String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.ACCOUNT_BUDGET;
|
|
String url = PropertiesUtils.getConfig("kuaishou_api_url") + KuaishouInterfaceConstant.ACCOUNT_BUDGET;
|
|
Map<String, String> headers = new HashMap<>();
|
|
Map<String, String> headers = new HashMap<>();
|
|
headers.put("Access-Token", oauthToken.getAccessToken());
|
|
headers.put("Access-Token", oauthToken.getAccessToken());
|
|
@@ -94,7 +94,11 @@ public class KuaishouAccountBudgetServiceImpl extends ServiceImpl<KuaishouAccoun
|
|
JSONObject json = new JSONObject();
|
|
JSONObject json = new JSONObject();
|
|
json.put("advertiser_id", oauthToken.getAccountId());
|
|
json.put("advertiser_id", oauthToken.getAccountId());
|
|
String result = HttpUtils.kuaiShouhttpPostRequest(url, json.toJSONString(), headers);
|
|
String result = HttpUtils.kuaiShouhttpPostRequest(url, json.toJSONString(), headers);
|
|
- Thread.sleep(500);
|
|
|
|
|
|
+ try {
|
|
|
|
+ Thread.sleep(500);
|
|
|
|
+ } catch (InterruptedException e) {
|
|
|
|
+ e.printStackTrace();
|
|
|
|
+ }
|
|
JSONObject resultJson = JSONObject.parseObject(result);
|
|
JSONObject resultJson = JSONObject.parseObject(result);
|
|
if (!Check.isNull(resultJson)) {
|
|
if (!Check.isNull(resultJson)) {
|
|
Integer code = resultJson.getInteger("code");
|
|
Integer code = resultJson.getInteger("code");
|