Explorar o código

fix: gdt config

pudongliang hai 5 meses
pai
achega
f5660c944d

+ 1 - 11
src/main/java/com/moka/gdtauto/config/TencentAdsConfig.java

@@ -13,19 +13,9 @@ import org.springframework.context.annotation.Configuration;
 public class TencentAdsConfig {
 
     /**
-     * 访问令牌
-     */
-    private String accessToken;
-
-    /**
-     * 刷新令牌
-     */
-    private String refreshToken;
-
-    /**
      * 应用ID
      */
-    private String appId;
+    private String clientId;
 
     /**
      * 应用密钥

+ 4 - 3
src/main/java/com/moka/gdtauto/service/TencentAdsAuthService.java

@@ -43,9 +43,10 @@ public class TencentAdsAuthService extends ServiceImpl<TencentAdsAuthMapper, Ten
      */
     public String getAuthorizationUrl(String redirectUri, String state) {
         String baseUrl = "https://developers.e.qq.com/oauth/authorize";
+        // 
         return String.format("%s?client_id=%s&redirect_uri=%s&state=%s&scope=",
                 baseUrl,
-                tencentAdsConfig.getAppId(),
+                tencentAdsConfig.getClientId(),
                 redirectUri,
                 state);
     }
@@ -159,7 +160,7 @@ public class TencentAdsAuthService extends ServiceImpl<TencentAdsAuthMapper, Ten
             tencentAds.init(new ApiContextConfig());
             
             // 调用OAuth API获取token
-            Long clientId = Long.parseLong(tencentAdsConfig.getAppId());
+            Long clientId = Long.parseLong(tencentAdsConfig.getClientId());
             String clientSecret = tencentAdsConfig.getSecret();
             String grantType = "authorization_code";
             
@@ -216,7 +217,7 @@ public class TencentAdsAuthService extends ServiceImpl<TencentAdsAuthMapper, Ten
             tencentAds.init(new ApiContextConfig());
             
             // 调用OAuth API刷新token
-            Long clientId = Long.parseLong(tencentAdsConfig.getAppId());
+            Long clientId = Long.parseLong(tencentAdsConfig.getClientId());
             String clientSecret = tencentAdsConfig.getSecret();
             String grantType = "refresh_token";
             

+ 0 - 8
src/main/resources/application-local.yml

@@ -47,11 +47,3 @@ spring:
           min-idle: 0
           max-wait: -1ms
       timeout: 3000ms
-
-# 腾讯广告API配置
-tencent:
-  ads:
-    access-token: 
-    refresh-token: 
-    app-id: 
-    secret: 

+ 0 - 8
src/main/resources/application-pro.yml

@@ -34,11 +34,3 @@ spring:
           min-idle: 0
           max-wait: -1ms
       timeout: 3000ms
-
-# 腾讯广告API配置
-tencent:
-  ads:
-    access-token: 
-    refresh-token: 
-    app-id: 
-    secret: 

+ 0 - 7
src/main/resources/application-test.yml

@@ -34,10 +34,3 @@ spring:
           max-wait: -1ms
       timeout: 3000ms
 
-# 腾讯广告API配置
-tencent:
-  ads:
-    access-token: 
-    refresh-token: 
-    app-id: 
-    secret: 

+ 7 - 0
src/main/resources/application.yml

@@ -44,3 +44,10 @@ plumelog:
     host: r-uf6odtyjx4otfkczwhpd.redis.rds.aliyuncs.com
     port: 52525
     auth: NTZY_LOg666%$_redis
+
+
+# 腾讯广告API配置
+tencent:
+  ads:
+    client-id: 
+    secret: