Browse Source

头条授权

yumeng 5 years ago
parent
commit
41f0d04b57

+ 8 - 0
module-common/src/main/java/cn/com/ctop/common/module/service/impl/BindAccountAuthServiceImpl.java

@@ -6,6 +6,7 @@ import cn.com.ctop.common.module.utils.PropertiesUtils;
 import cn.com.ctop.common.module.entity.BindAccountAuth;
 import cn.com.ctop.common.module.mapper.BindAccountAuthMapper;
 import cn.com.ctop.common.module.service.IBindAccountAuthService;
+import com.alibaba.fastjson.JSONArray;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -70,10 +71,17 @@ public class BindAccountAuthServiceImpl extends ServiceImpl<BindAccountAuthMappe
     @Override
     public String getByteDanceCodeUrl(String state) throws UnsupportedEncodingException {
         StringBuffer sb = new StringBuffer();
+        JSONArray jsonArray = new JSONArray();
+        jsonArray.add("1");
+        jsonArray.add("2");
+        jsonArray.add("3");
+        jsonArray.add("4");
+        jsonArray.add("5");
         sb.append(PropertiesUtils.getValue("bytedance_config", "bytedance_auth_url"))
                 .append(BytedanceInterfaceConstant.AUTH_PATH)
                 .append("?app_id=" + PropertiesUtils.getValue("bytedance_config", "bytedance_appid"))
                 .append("&state=" + URLEncoder.encode(state))
+                .append(jsonArray)
                 .append("&redirect_uri=" + URLEncoder.encode(PropertiesUtils.getValue("bytedance_config", "bytedance_callback_url"), "UTF-8"));
         return sb.toString();
     }