|
@@ -13,10 +13,10 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.xxl.job.core.context.XxlJobHelper;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import javax.annotation.Resource;
|
|
|
import java.util.*;
|
|
|
|
|
|
/**
|
|
@@ -36,9 +36,12 @@ public class CtopOauthTokenServiceImpl extends ServiceImpl<CtopOauthTokenMapper,
|
|
|
private String bytedanceUrlApiPrefix;
|
|
|
@Value("${bytedance.url.refresh-token}")
|
|
|
private String bytedanceUrlRefreshToken;
|
|
|
- @Autowired
|
|
|
+ @Value("${kuaishou.api-url}")
|
|
|
+ private String kuaishouApiUrl;
|
|
|
+
|
|
|
+ @Resource
|
|
|
private CtopOauthTokenMapper ctopOauthTokenMapper;
|
|
|
- @Autowired
|
|
|
+ @Resource
|
|
|
private OauthAgentTokenMapper agentTokenMapper;
|
|
|
|
|
|
@Override
|
|
@@ -123,7 +126,7 @@ public class CtopOauthTokenServiceImpl extends ServiceImpl<CtopOauthTokenMapper,
|
|
|
@Override
|
|
|
public void getKuaiShouRefreshToken(Long accountId, String token, String refreshToken, Long appId, String secret) {
|
|
|
log.info("快手刷新token入参,accountId:{},token:{},refreshToken:{}", accountId, token, refreshToken);
|
|
|
- String url = PropertiesUtils.getConfig("kuaishou_api_url") + "/rest/openapi/oauth2/authorize/refresh_token";
|
|
|
+ String url = kuaishouApiUrl + "/rest/openapi/oauth2/authorize/refresh_token";
|
|
|
Map<String, String> headers = new HashMap<>();
|
|
|
headers.put("Content-Type", " application/json");
|
|
|
Map<String, Object> param = new HashMap<>();
|
|
@@ -245,7 +248,7 @@ public class CtopOauthTokenServiceImpl extends ServiceImpl<CtopOauthTokenMapper,
|
|
|
@Override
|
|
|
public void getKuaiShouAgentRefreshToken(Long agentId, String accessToken, String refreshToken) {
|
|
|
log.info("快手刷新token入参,token:{},refreshToken:{}", accessToken, refreshToken);
|
|
|
- String url = PropertiesUtils.getConfig("kuaishou_api_url") + "/rest/openapi/oauth2/authorize/refresh_token";
|
|
|
+ String url = kuaishouApiUrl + "/rest/openapi/oauth2/authorize/refresh_token";
|
|
|
Map<String, String> headers = new HashMap<>();
|
|
|
headers.put("Content-Type", " application/json");
|
|
|
Map<String, Object> param = new HashMap<>();
|