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