ソースを参照

刷新密钥

master
PoffyZhang 1年前
コミット
f42c0b2ddc
9個のファイルの変更37行の追加0行の削除
  1. +4
    -0
      pmapi/pom.xml
  2. +10
    -0
      pmapi/src/main/java/com/ningdatech/pmapi/ding/controller/DingInfoPullController.java
  3. +3
    -0
      pmapi/src/main/resources/application-dev.yml
  4. +3
    -0
      pmapi/src/main/resources/application-pre.yml
  5. +3
    -0
      pmapi/src/main/resources/application-prod.yml
  6. +3
    -0
      pmapi/src/test/resources/application-dev.yml
  7. +3
    -0
      pmapi/src/test/resources/application-pre.yml
  8. +3
    -0
      pmapi/src/test/resources/application-prod.yml
  9. +5
    -0
      pom.xml

+ 4
- 0
pmapi/pom.xml ファイルの表示

@@ -207,6 +207,10 @@
</dependency>
<dependency>
<groupId>com.ningdatech</groupId>
<artifactId>nd-irs-starter</artifactId>
</dependency>
<dependency>
<groupId>com.ningdatech</groupId>
<artifactId>nd-yxt-starter</artifactId>
<version>1.0.0</version>
</dependency>


+ 10
- 0
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;


+ 3
- 0
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:


+ 3
- 0
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:


+ 3
- 0
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:


+ 3
- 0
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:


+ 3
- 0
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:


+ 3
- 0
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:


+ 5
- 0
pom.xml ファイルの表示

@@ -138,6 +138,11 @@
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.ningdatech</groupId>
<artifactId>nd-irs-starter</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.10.6</version>


読み込み中…
キャンセル
保存