@@ -207,6 +207,10 @@ | |||||
</dependency> | </dependency> | ||||
<dependency> | <dependency> | ||||
<groupId>com.ningdatech</groupId> | <groupId>com.ningdatech</groupId> | ||||
<artifactId>nd-irs-starter</artifactId> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>com.ningdatech</groupId> | |||||
<artifactId>nd-yxt-starter</artifactId> | <artifactId>nd-yxt-starter</artifactId> | ||||
<version>1.0.0</version> | <version>1.0.0</version> | ||||
</dependency> | </dependency> | ||||
@@ -1,5 +1,6 @@ | |||||
package com.ningdatech.pmapi.ding.controller; | 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.CryptUtils; | ||||
import com.ningdatech.pmapi.common.util.HttpUtil; | import com.ningdatech.pmapi.common.util.HttpUtil; | ||||
import com.ningdatech.pmapi.ding.task.EmployeeBatchGetTask; | import com.ningdatech.pmapi.ding.task.EmployeeBatchGetTask; | ||||
@@ -9,6 +10,7 @@ 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.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.*; | ||||
@@ -37,6 +39,12 @@ public class DingInfoPullController { | |||||
private final ProcDefManage procDefManage; | 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") | @GetMapping("/employee") | ||||
public void employeeBatchGet() { | public void employeeBatchGet() { | ||||
@@ -102,6 +110,8 @@ public class DingInfoPullController { | |||||
String appSecret = "496f0f2a19994f76b4fd9dae087366c7"; | String appSecret = "496f0f2a19994f76b4fd9dae087366c7"; | ||||
String appKey = "A331101453557202109017383"; | String appKey = "A331101453557202109017383"; | ||||
String dataName = "大数据管理局"; | String dataName = "大数据管理局"; | ||||
String secret = refreshTokenService.refreshToken(appKey,appSecret,requestTokenUrl,refreshTokenUrl); | |||||
String sign = CryptUtils.MD5Encode(appKey + appSecret + timestamp); | String sign = CryptUtils.MD5Encode(appKey + appSecret + timestamp); | ||||
HttpComponentsClientHttpRequestFactory factory = HttpUtil.generateHttpRequestFactory(); | HttpComponentsClientHttpRequestFactory factory = HttpUtil.generateHttpRequestFactory(); | ||||
RestTemplate restTemplate; | RestTemplate restTemplate; | ||||
@@ -223,6 +223,9 @@ irs: | |||||
url: https://interface.zjzwfw.gov.cn/gateway/api/001003001029/dataSharing/XS8daav3bcemZ3Ra.htm | url: https://interface.zjzwfw.gov.cn/gateway/api/001003001029/dataSharing/XS8daav3bcemZ3Ra.htm | ||||
appScret: 496f0f2a19994f76b4fd9dae087366c7 | appScret: 496f0f2a19994f76b4fd9dae087366c7 | ||||
appKey: A331101453557202109017383 | 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 | hostname: iZbp13nwyvib53j4j1p2xoZ | ||||
login: | login: | ||||
@@ -226,6 +226,9 @@ irs: | |||||
url: https://interface.zjzwfw.gov.cn/gateway/api/001003001029/dataSharing/XS8daav3bcemZ3Ra.htm | url: https://interface.zjzwfw.gov.cn/gateway/api/001003001029/dataSharing/XS8daav3bcemZ3Ra.htm | ||||
appScret: 496f0f2a19994f76b4fd9dae087366c7 | appScret: 496f0f2a19994f76b4fd9dae087366c7 | ||||
appKey: A331101453557202109017383 | 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 | hostname: iZ6mx01asxnsmennpzoxooZ | ||||
login: | login: | ||||
phone-verify-code: | phone-verify-code: | ||||
@@ -226,6 +226,9 @@ irs: | |||||
url: https://interface.zjzwfw.gov.cn/gateway/api/001003001029/dataSharing/XS8daav3bcemZ3Ra.htm | url: https://interface.zjzwfw.gov.cn/gateway/api/001003001029/dataSharing/XS8daav3bcemZ3Ra.htm | ||||
appScret: 496f0f2a19994f76b4fd9dae087366c7 | appScret: 496f0f2a19994f76b4fd9dae087366c7 | ||||
appKey: A331101453557202109017383 | 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 | hostname: iZ6mx01gyeodd80imxd2gbZ | ||||
login: | login: | ||||
phone-verify-code: | phone-verify-code: | ||||
@@ -222,6 +222,9 @@ irs: | |||||
url: https://interface.zjzwfw.gov.cn/gateway/api/001003001029/dataSharing/XS8daav3bcemZ3Ra.htm | url: https://interface.zjzwfw.gov.cn/gateway/api/001003001029/dataSharing/XS8daav3bcemZ3Ra.htm | ||||
appScret: 496f0f2a19994f76b4fd9dae087366c7 | appScret: 496f0f2a19994f76b4fd9dae087366c7 | ||||
appKey: A331101453557202109017383 | 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 | hostname: iZbp13nwyvib53j4j1p2xoZ | ||||
login: | login: | ||||
@@ -226,6 +226,9 @@ irs: | |||||
url: https://interface.zjzwfw.gov.cn/gateway/api/001003001029/dataSharing/XS8daav3bcemZ3Ra.htm | url: https://interface.zjzwfw.gov.cn/gateway/api/001003001029/dataSharing/XS8daav3bcemZ3Ra.htm | ||||
appScret: 496f0f2a19994f76b4fd9dae087366c7 | appScret: 496f0f2a19994f76b4fd9dae087366c7 | ||||
appKey: A331101453557202109017383 | 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 | hostname: iZ6mx01asxnsmennpzoxooZ | ||||
login: | login: | ||||
phone-verify-code: | phone-verify-code: | ||||
@@ -221,6 +221,9 @@ irs: | |||||
url: https://interface.zjzwfw.gov.cn/gateway/api/001003001029/dataSharing/XS8daav3bcemZ3Ra.htm | url: https://interface.zjzwfw.gov.cn/gateway/api/001003001029/dataSharing/XS8daav3bcemZ3Ra.htm | ||||
appScret: 496f0f2a19994f76b4fd9dae087366c7 | appScret: 496f0f2a19994f76b4fd9dae087366c7 | ||||
appKey: A331101453557202109017383 | 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 | hostname: iZ6mx01gyeodd80imxd2gbZ | ||||
login: | login: | ||||
phone-verify-code: | phone-verify-code: | ||||
@@ -138,6 +138,11 @@ | |||||
<version>1.0.0</version> | <version>1.0.0</version> | ||||
</dependency> | </dependency> | ||||
<dependency> | <dependency> | ||||
<groupId>com.ningdatech</groupId> | |||||
<artifactId>nd-irs-starter</artifactId> | |||||
<version>1.0.0</version> | |||||
</dependency> | |||||
<dependency> | |||||
<groupId>joda-time</groupId> | <groupId>joda-time</groupId> | ||||
<artifactId>joda-time</artifactId> | <artifactId>joda-time</artifactId> | ||||
<version>2.10.6</version> | <version>2.10.6</version> | ||||