|
|
@@ -1,5 +1,6 @@ |
|
|
|
package com.ningdatech.pmapi.ding.controller; |
|
|
|
|
|
|
|
import com.ningdatech.irs.service.IRefreshTokenService; |
|
|
|
import com.ningdatech.pmapi.common.util.CryptUtils; |
|
|
|
import com.ningdatech.pmapi.common.util.HttpUtil; |
|
|
|
import com.ningdatech.pmapi.ding.task.EmployeeBatchGetTask; |
|
|
@@ -9,6 +10,7 @@ import com.ningdatech.pmapi.organization.manage.ProcDefManage; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
import org.springframework.http.ResponseEntity; |
|
|
|
import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
@@ -37,6 +39,12 @@ public class DingInfoPullController { |
|
|
|
|
|
|
|
private final ProcDefManage procDefManage; |
|
|
|
|
|
|
|
private final IRefreshTokenService refreshTokenService; |
|
|
|
|
|
|
|
@Value("${irs.interface-local-refresh.request-token-url}") |
|
|
|
private String requestTokenUrl; |
|
|
|
@Value("${irs.interface-local-refresh.refresh-token-url}") |
|
|
|
private String refreshTokenUrl; |
|
|
|
|
|
|
|
@GetMapping("/employee") |
|
|
|
public void employeeBatchGet() { |
|
|
@@ -102,6 +110,8 @@ public class DingInfoPullController { |
|
|
|
String appSecret = "496f0f2a19994f76b4fd9dae087366c7"; |
|
|
|
String appKey = "A331101453557202109017383"; |
|
|
|
String dataName = "大数据管理局"; |
|
|
|
|
|
|
|
String secret = refreshTokenService.refreshToken(appKey,appSecret,requestTokenUrl,refreshTokenUrl); |
|
|
|
String sign = CryptUtils.MD5Encode(appKey + appSecret + timestamp); |
|
|
|
HttpComponentsClientHttpRequestFactory factory = HttpUtil.generateHttpRequestFactory(); |
|
|
|
RestTemplate restTemplate; |
|
|
|