|
@@ -13,16 +13,6 @@ import cn.com.ctop.toutiao.entity.ByteDanceAdvertiser;
|
|
|
import cn.com.ctop.toutiao.service.IByteDanceAdvertiserDataService;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
-import lombok.val;
|
|
|
-import me.chanjar.weixin.common.error.WxErrorException;
|
|
|
-import me.chanjar.weixin.cp.api.WxCpOAuth2Service;
|
|
|
-import me.chanjar.weixin.cp.api.WxCpUserService;
|
|
|
-import me.chanjar.weixin.cp.api.impl.WxCpOAuth2ServiceImpl;
|
|
|
-import me.chanjar.weixin.cp.api.impl.WxCpServiceImpl;
|
|
|
-import me.chanjar.weixin.cp.api.impl.WxCpUserServiceImpl;
|
|
|
-import me.chanjar.weixin.cp.bean.WxCpOauth2UserInfo;
|
|
|
-import me.chanjar.weixin.cp.bean.WxCpUser;
|
|
|
-import me.chanjar.weixin.cp.config.impl.WxCpDefaultConfigImpl;
|
|
|
import org.apache.commons.lang.StringUtils;
|
|
|
import org.jeecg.common.api.vo.Result;
|
|
|
import org.jeecg.common.constant.CommonConstant;
|
|
@@ -119,6 +109,7 @@ public class CallbackController {
|
|
|
result.success("登录成功");
|
|
|
return result;
|
|
|
}
|
|
|
+
|
|
|
/**
|
|
|
* TODO 授权绑定成功/失败 需要跳转特定页面
|
|
|
*
|
|
@@ -255,6 +246,7 @@ public class CallbackController {
|
|
|
param.put("secret", PropertiesUtils.getValue("bytedance_config", "bytedance_secret"));
|
|
|
param.put("grant_type", "auth_code");
|
|
|
param.put("auth_code", authCode);
|
|
|
+ logger.info("authCode:{}", authCode);
|
|
|
logger.info("state:{}", state);
|
|
|
Map<String, Object> returnMap = new HashMap<>();
|
|
|
try {
|
|
@@ -264,6 +256,7 @@ public class CallbackController {
|
|
|
}
|
|
|
String result = HttpUtils.httpPostRequest(PropertiesUtils.getValue("bytedance_config", "bytedance_api_url") + BytedanceInterfaceConstant.AUTH_TOKEN, param, new HashMap<>());
|
|
|
JSONObject resultObject = JSONObject.parseObject(result);
|
|
|
+ logger.info("返回信息:{}", resultObject);
|
|
|
Integer code = resultObject.getInteger("code");
|
|
|
String message = resultObject.getString("message");
|
|
|
if (null == code || code != 0) {
|