|
@@ -10,12 +10,14 @@ import com.ningdatech.pmapi.organization.manage.ProcDefManage; |
|
|
import io.swagger.annotations.ApiOperation; |
|
|
import io.swagger.annotations.ApiOperation; |
|
|
import lombok.RequiredArgsConstructor; |
|
|
import lombok.RequiredArgsConstructor; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
import org.springframework.http.ResponseEntity; |
|
|
import org.springframework.http.ResponseEntity; |
|
|
import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; |
|
|
import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; |
|
|
import org.springframework.web.bind.annotation.*; |
|
|
import org.springframework.web.bind.annotation.*; |
|
|
import org.springframework.web.client.RestTemplate; |
|
|
import org.springframework.web.client.RestTemplate; |
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
import java.security.NoSuchAlgorithmException; |
|
|
import java.security.NoSuchAlgorithmException; |
|
|
import java.util.Objects; |
|
|
import java.util.Objects; |
|
|
|
|
|
|
|
@@ -39,7 +41,8 @@ public class DingInfoPullController { |
|
|
|
|
|
|
|
|
private final ProcDefManage procDefManage; |
|
|
private final ProcDefManage procDefManage; |
|
|
|
|
|
|
|
|
private final IRefreshTokenService refreshTokenService; |
|
|
|
|
|
|
|
|
@Resource(name = "refreshToken") |
|
|
|
|
|
private IRefreshTokenService refreshTokenService; |
|
|
|
|
|
|
|
|
@Value("${irs.interface-local-refresh.request-token-url}") |
|
|
@Value("${irs.interface-local-refresh.request-token-url}") |
|
|
private String requestTokenUrl; |
|
|
private String requestTokenUrl; |
|
@@ -112,7 +115,7 @@ public class DingInfoPullController { |
|
|
String dataName = "大数据管理局"; |
|
|
String dataName = "大数据管理局"; |
|
|
|
|
|
|
|
|
String secret = refreshTokenService.refreshToken(appKey,appSecret,requestTokenUrl,refreshTokenUrl); |
|
|
String secret = refreshTokenService.refreshToken(appKey,appSecret,requestTokenUrl,refreshTokenUrl); |
|
|
String sign = CryptUtils.MD5Encode(appKey + appSecret + timestamp); |
|
|
|
|
|
|
|
|
String sign = CryptUtils.MD5Encode(appKey + secret + timestamp); |
|
|
HttpComponentsClientHttpRequestFactory factory = HttpUtil.generateHttpRequestFactory(); |
|
|
HttpComponentsClientHttpRequestFactory factory = HttpUtil.generateHttpRequestFactory(); |
|
|
RestTemplate restTemplate; |
|
|
RestTemplate restTemplate; |
|
|
if(Objects.nonNull(factory)){ |
|
|
if(Objects.nonNull(factory)){ |
|
|