|
|
@@ -11,7 +11,6 @@ import cn.com.ctop.common.module.utils.PropertiesUtils;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
-import com.xxl.job.core.log.XxlJobLogger;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
@@ -64,9 +63,7 @@ public class CtopOauthTokenServiceImpl extends ServiceImpl<CtopOauthTokenMapper,
|
|
|
param.put("grant_type", "refresh_token");
|
|
|
param.put("refresh_token", token.getRefreshToken());
|
|
|
String result = HttpUtils.httpPostRequest(url, param, new HashMap<>());
|
|
|
- XxlJobLogger.log("头条刷新token;accountId:{},返回信息:{}", token.getAccountId(), result);
|
|
|
if (null == result || "".equals(result.trim()) || "null".equalsIgnoreCase(result)) {
|
|
|
- XxlJobLogger.log("头条刷新token失败;accountId:{},返回信息:{}", token.getAccountId(), result);
|
|
|
resultMap.put("message", "token刷新失败");
|
|
|
resultMap.put("token", token);
|
|
|
resultMap.put("code", 0);
|
|
|
@@ -90,12 +87,11 @@ public class CtopOauthTokenServiceImpl extends ServiceImpl<CtopOauthTokenMapper,
|
|
|
queryWrapper.eq("media_id", 1);
|
|
|
int i = ctopOauthTokenMapper.update(updateRefreshToken, queryWrapper);
|
|
|
if (i > 0) {
|
|
|
- XxlJobLogger.log("头条刷新token成功:accountId:{}", token.getAccountId());
|
|
|
+
|
|
|
}
|
|
|
resultMap.put("message", "token刷新成功");
|
|
|
resultMap.put("code", 0);
|
|
|
} else {
|
|
|
- XxlJobLogger.log("头条刷新token失败;accountId:{},返回信息:{}", token.getAccountId(), message);
|
|
|
resultMap.put("message", message);
|
|
|
resultMap.put("token", token);
|
|
|
resultMap.put("code", 0);
|