Procházet zdrojové kódy

coding:投流代码提交

zhangqin před 3 dny
rodič
revize
009c8f2413

+ 2 - 1
fs-ad-new-api/src/main/resources/application.yml

@@ -4,5 +4,6 @@ server:
 # Spring配置
 spring:
   profiles:
-    active: dev
+#    active: dev
+    active: druid-ylrz
 

+ 4 - 2
fs-service/src/main/java/com/fs/newAdv/integration/client/advertiser/OceanEngineApiClient.java

@@ -39,7 +39,7 @@ public class OceanEngineApiClient extends AbstractApiClient implements IAccessTo
     /**
      * 获取Access Token
      */
-    private static final String ACCESS_TOKEN_URL = "https://api.oceanengine.com/open_api/oauth2/access_token";
+    private static final String ACCESS_TOKEN_URL = "https://api.oceanengine.com/open_api/oauth2/access_token/";
     /**
      * 刷新 Token
      */
@@ -163,9 +163,11 @@ public class OceanEngineApiClient extends AbstractApiClient implements IAccessTo
         map.put("auth_code", request.getAuthCode());
         HttpResponse response = HttpRequest.post(ACCESS_TOKEN_URL)
                 .header("Content-Type", "application/json")
-                .form(JSONUtil.toJsonStr(map))
+                .body(JSONUtil.toJsonStr(map))
                 .timeout(SystemConstant.API_TIMEOUT)
                 .execute();
+        String body = response.body();
+        log.info("巨量获取token数据{}", body);
         JSONObject res = new JSONObject(response.body());
         int code = (int) res.get("code");
         if (code == 0) {