diff --git a/pmapi/pom.xml b/pmapi/pom.xml
index d32a0a6..a35fa48 100644
--- a/pmapi/pom.xml
+++ b/pmapi/pom.xml
@@ -207,6 +207,10 @@
com.ningdatech
+ nd-irs-starter
+
+
+ com.ningdatech
nd-yxt-starter
1.0.0
diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/ding/controller/DingInfoPullController.java b/pmapi/src/main/java/com/ningdatech/pmapi/ding/controller/DingInfoPullController.java
index 714edf3..173457a 100644
--- a/pmapi/src/main/java/com/ningdatech/pmapi/ding/controller/DingInfoPullController.java
+++ b/pmapi/src/main/java/com/ningdatech/pmapi/ding/controller/DingInfoPullController.java
@@ -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;
diff --git a/pmapi/src/main/resources/application-dev.yml b/pmapi/src/main/resources/application-dev.yml
index 3cf6345..7ae68ce 100644
--- a/pmapi/src/main/resources/application-dev.yml
+++ b/pmapi/src/main/resources/application-dev.yml
@@ -223,6 +223,9 @@ irs:
url: https://interface.zjzwfw.gov.cn/gateway/api/001003001029/dataSharing/XS8daav3bcemZ3Ra.htm
appScret: 496f0f2a19994f76b4fd9dae087366c7
appKey: A331101453557202109017383
+ interface-local-refresh:
+ request-token-url: https://interface.ls.local/a/api/requestTokenKey
+ refresh-token-url: https://interface.ls.local/a/api/refreshTokenKey
hostname: iZbp13nwyvib53j4j1p2xoZ
login:
diff --git a/pmapi/src/main/resources/application-pre.yml b/pmapi/src/main/resources/application-pre.yml
index e0330c2..bb76850 100644
--- a/pmapi/src/main/resources/application-pre.yml
+++ b/pmapi/src/main/resources/application-pre.yml
@@ -226,6 +226,9 @@ irs:
url: https://interface.zjzwfw.gov.cn/gateway/api/001003001029/dataSharing/XS8daav3bcemZ3Ra.htm
appScret: 496f0f2a19994f76b4fd9dae087366c7
appKey: A331101453557202109017383
+ interface-local-refresh:
+ request-token-url: https://interface.ls.local/a/api/requestTokenKey
+ refresh-token-url: https://interface.ls.local/a/api/refreshTokenKey
hostname: iZ6mx01asxnsmennpzoxooZ
login:
phone-verify-code:
diff --git a/pmapi/src/main/resources/application-prod.yml b/pmapi/src/main/resources/application-prod.yml
index ff426bb..828a700 100644
--- a/pmapi/src/main/resources/application-prod.yml
+++ b/pmapi/src/main/resources/application-prod.yml
@@ -226,6 +226,9 @@ irs:
url: https://interface.zjzwfw.gov.cn/gateway/api/001003001029/dataSharing/XS8daav3bcemZ3Ra.htm
appScret: 496f0f2a19994f76b4fd9dae087366c7
appKey: A331101453557202109017383
+ interface-local-refresh:
+ request-token-url: https://interface.ls.local/a/api/requestTokenKey
+ refresh-token-url: https://interface.ls.local/a/api/refreshTokenKey
hostname: iZ6mx01gyeodd80imxd2gbZ
login:
phone-verify-code:
diff --git a/pmapi/src/test/resources/application-dev.yml b/pmapi/src/test/resources/application-dev.yml
index 66d82c4..c6effa5 100644
--- a/pmapi/src/test/resources/application-dev.yml
+++ b/pmapi/src/test/resources/application-dev.yml
@@ -222,6 +222,9 @@ irs:
url: https://interface.zjzwfw.gov.cn/gateway/api/001003001029/dataSharing/XS8daav3bcemZ3Ra.htm
appScret: 496f0f2a19994f76b4fd9dae087366c7
appKey: A331101453557202109017383
+ interface-local-refresh:
+ request-token-url: https://interface.ls.local/a/api/requestTokenKey
+ refresh-token-url: https://interface.ls.local/a/api/refreshTokenKey
hostname: iZbp13nwyvib53j4j1p2xoZ
login:
diff --git a/pmapi/src/test/resources/application-pre.yml b/pmapi/src/test/resources/application-pre.yml
index e0330c2..bb76850 100644
--- a/pmapi/src/test/resources/application-pre.yml
+++ b/pmapi/src/test/resources/application-pre.yml
@@ -226,6 +226,9 @@ irs:
url: https://interface.zjzwfw.gov.cn/gateway/api/001003001029/dataSharing/XS8daav3bcemZ3Ra.htm
appScret: 496f0f2a19994f76b4fd9dae087366c7
appKey: A331101453557202109017383
+ interface-local-refresh:
+ request-token-url: https://interface.ls.local/a/api/requestTokenKey
+ refresh-token-url: https://interface.ls.local/a/api/refreshTokenKey
hostname: iZ6mx01asxnsmennpzoxooZ
login:
phone-verify-code:
diff --git a/pmapi/src/test/resources/application-prod.yml b/pmapi/src/test/resources/application-prod.yml
index f855139..fb53797 100644
--- a/pmapi/src/test/resources/application-prod.yml
+++ b/pmapi/src/test/resources/application-prod.yml
@@ -221,6 +221,9 @@ irs:
url: https://interface.zjzwfw.gov.cn/gateway/api/001003001029/dataSharing/XS8daav3bcemZ3Ra.htm
appScret: 496f0f2a19994f76b4fd9dae087366c7
appKey: A331101453557202109017383
+ interface-local-refresh:
+ request-token-url: https://interface.ls.local/a/api/requestTokenKey
+ refresh-token-url: https://interface.ls.local/a/api/refreshTokenKey
hostname: iZ6mx01gyeodd80imxd2gbZ
login:
phone-verify-code:
diff --git a/pom.xml b/pom.xml
index 916325b..10e3d7a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -138,6 +138,11 @@
1.0.0
+ com.ningdatech
+ nd-irs-starter
+ 1.0.0
+
+
joda-time
joda-time
2.10.6