Просмотр исходного кода

Merge remote-tracking branch 'origin/master'

syh 5 лет назад
Родитель
Сommit
db2e8079b1

+ 1 - 0
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/CallbackController.java

@@ -112,6 +112,7 @@ public class CallbackController {
                     long refreshTokenExpireIn = token.getRefreshTokenExpiresIn() * 1000L;
                     Date refreshTokenExpireInDate = new Date(now + refreshTokenExpireIn);
                     topOauthToken.setRefreshTokenExpiresIn(refreshTokenExpireInDate);
+                    topOauthToken.setUpdateTime(new Date());
                     cTopOauthTokenMapper.insert(topOauthToken);
                     bindAccountAuthService.addBindAccount(accountId, KuaishouInterfaceConstant.LOGIN_TYPE_KUAISHOU, advertiser_id); //账号绑定
                 }

+ 3 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/service/impl/BindAccountAuthServiceImpl.java

@@ -14,6 +14,7 @@ import org.springframework.stereotype.Service;
 
 import java.io.UnsupportedEncodingException;
 import java.net.URLEncoder;
+import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -48,6 +49,7 @@ public class BindAccountAuthServiceImpl extends ServiceImpl<BindAccountAuthMappe
         bindAccount.setAccountId(accountId);
 
         bindAccount.setAdvertiserId(state);
+        bindAccount.setUpdateTime(new Date());
         bindAccount.setAuthType(authType);
         int i = bindAccountAuthMapper.insert(bindAccount);
         if (i > 0) {
@@ -62,7 +64,7 @@ public class BindAccountAuthServiceImpl extends ServiceImpl<BindAccountAuthMappe
         sb.append(PropertiesUtils.getValue("kuaishou_config", "kuaishou_auth_url"))
                 .append(KuaishouInterfaceConstant.AUTH_PATH)
                 .append("?app_id=" + PropertiesUtils.getValue("kuaishou_config", "kuaishou_appid"))
-                .append("&state=" + URLEncoder.encode(state))
+                .append("&state=" + URLEncoder.encode(URLEncoder.encode(state)))
                 .append("&scope=%5B%22report_service%22%2C%22ad_query%22%2C%22ad_manage%22%5D")
                 .append("&redirect_uri=" + URLEncoder.encode(PropertiesUtils.getValue("kuaishou_config", "kuaishou_callback_url"), "UTF-8"));
         return sb.toString();

+ 1 - 1
jeecg-boot-module-system/src/main/resources/application.yml

@@ -1,6 +1,6 @@
 spring:
   profiles:
-    active: dev
+    active: prod
 swagger:
   production: false
   basic:

+ 1 - 1
module-kuaishou/src/main/resources/kuaishou_config.properties

@@ -2,4 +2,4 @@ kuaishou_api_url=https://ad.e.kuaishou.com
 kuaishou_auth_url=https://ad.e.kuaishou.com
 kuaishou_appid=27
 kuaishou_secret=QovprB1tNhXptgDc
-kuaishou_callback_url=http://callback.c-top.com.cn/kuaishou
+kuaishou_callback_url=http://adsp.c-top.com.cn:8080/jeecg-boot/kuaishou