|
@@ -86,17 +86,17 @@ public class ByteDanceAdvertiserDataServiceImpl implements IByteDanceAdvertiserD
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public Map<String, Object> getAdvertiserInfo(String accountId) {
|
|
|
+ public Map<String, Object> getAdvertiserInfo(String accountId,String token) {
|
|
|
Map<String, Object> resultMap = new HashMap<>();
|
|
|
- CtopOauthToken cTopOauthToken = tokenService.getOauthTokenByAccountId(accountId);
|
|
|
+ // CtopOauthToken cTopOauthToken = tokenService.getOauthTokenByAccountId(accountId);
|
|
|
//2: 根据token以及用户id获取用户信息数据
|
|
|
String url = PropertiesUtils.getValue("bytedance_config", "bytedance_api_url") + PropertiesUtils.getValue("bytedance_config", "bytedance_v2_advertiser_info");
|
|
|
Map<String, String> headers = new HashMap<>();
|
|
|
headers.put("Content-Type", "application/json");
|
|
|
- headers.put("Access-Token", cTopOauthToken.getAccessToken());
|
|
|
+ headers.put("Access-Token", token);
|
|
|
TreeMap<String, Object> params = new TreeMap<>();
|
|
|
//TODO jsonArray
|
|
|
- params.put("advertiser_ids", "[" + cTopOauthToken.getAccountId() + "]");
|
|
|
+ params.put("advertiser_ids", "[" + accountId + "]");
|
|
|
String result = HttpUtils.httpGetRequest(url, headers, params);
|
|
|
JSONObject jsonObject = JSONObject.parseObject(result);
|
|
|
Integer code = jsonObject.getInteger("code");
|