Browse Source

刷新密钥。。。

master
PoffyZhang 1 year ago
parent
commit
979d43f497
9 changed files with 51 additions and 11 deletions
  1. +40
    -9
      pmapi/src/main/java/com/ningdatech/pmapi/ding/controller/DingInfoPullController.java
  2. +4
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/provincial/service/impl/JoinReviewProvincialBureauServiceImpl.java
  3. +1
    -0
      pmapi/src/main/resources/application-dev.yml
  4. +1
    -0
      pmapi/src/main/resources/application-pre.yml
  5. +1
    -0
      pmapi/src/main/resources/application-prod.yml
  6. +1
    -1
      pmapi/src/test/java/com/ningdatech/pmapi/irs/irsTest3.java
  7. +1
    -0
      pmapi/src/test/resources/application-dev.yml
  8. +1
    -0
      pmapi/src/test/resources/application-pre.yml
  9. +1
    -0
      pmapi/src/test/resources/application-prod.yml

+ 40
- 9
pmapi/src/main/java/com/ningdatech/pmapi/ding/controller/DingInfoPullController.java View File

@@ -115,7 +115,8 @@ public class DingInfoPullController {
String appSecret = "496f0f2a19994f76b4fd9dae087366c7";
String appKey = "A331101453557202109017383";
String method = "POST";
String secret = refreshTokenService.refreshToken(appKey,appSecret,govRequestTokenUrl,govRefreshTokenUrl,method);
String interfaceName = "5crv7i4727abLCv0";
String secret = refreshTokenService.refreshToken(appKey,appSecret,govRequestTokenUrl,govRefreshTokenUrl,interfaceName,method);
log.info("secret :{}",secret);
String sign = MD5.create().digestHex(appKey + secret + timestamp);
HttpComponentsClientHttpRequestFactory factory = HttpUtil.generateHttpRequestFactory();
@@ -126,13 +127,12 @@ public class DingInfoPullController {
restTemplate = new RestTemplate();
}
String appId = "A330000100000202105005790";
String updateTime = "2023-07-26 00:00:00";
String capCode = MD5.create().digestHex(timestamp + updateTime + appId);
String capCode = MD5.create().digestHex(timestamp + appId);
String url = "https://interface.zjzwfw.gov.cn/gateway/api/proxy/001003001029/" +
"dataSharing/5crv7i4727abLCv0.htm?requestTime=" + timestamp +
"&sign=" + sign + "&appKey=" + appKey +
"&capCode=" + capCode + "&capTime=" + timestamp +
"&appId=" + appId + "&updateTime=" + updateTime;
"&appId=" + appId;
log.info("url :{}",url);
ResponseEntity<String> forEntity = restTemplate.getForEntity(url, String.class);
log.info(forEntity.getBody());
@@ -146,7 +146,8 @@ public class DingInfoPullController {
String appSecret = "496f0f2a19994f76b4fd9dae087366c7";
String appKey = "A331101453557202109017383";
String method = "POST";
String secret = refreshTokenService.refreshToken(appKey,appSecret,govRequestTokenUrl,govRefreshTokenUrl,method);
String interfaceName = "3XN9R93Pva6db7sf";
String secret = refreshTokenService.refreshToken(appKey,appSecret,govRequestTokenUrl,govRefreshTokenUrl,interfaceName,method);
log.info("secret :{}",secret);
String sign = MD5.create().digestHex(appKey + secret + timestamp);
HttpComponentsClientHttpRequestFactory factory = HttpUtil.generateHttpRequestFactory();
@@ -156,12 +157,42 @@ public class DingInfoPullController {
}else{
restTemplate = new RestTemplate();
}
String appId = "A330000100000202105005790";
String updateTime = "2023-07-26 00:00:00";
String capCode = MD5.create().digestHex(timestamp + updateTime + appId);
String baseProjPrincipal = "蒋国海";
String baseProjSetYear = "2022";
String baseProjId = "331123220130969000000";
String baseManDeprt = "遂昌县大数据和金融发展中心";
String baseProjBasis = "2";
String baseLowestLevel = "C";
String ProjPrincipalCall = "13884366607";
//内容类别
String baseConstructionType = "01";
String baseProjType = "1";
String baseProjContacts = "毛以林";
String isEffective = "1";
String baseConsDeprtDing = "GO_9a7dce7fbaf54787998fa004f1b7c0e1";
String baseProjSetProg = "04";
String baseProjContactsCall = "13857049999";
String baseProjName = "遂昌县大数据和金融发展中心天工系统";
String baseProjConsClass = "C";
String areaCode = "331123000";
String baseAreaName = "遂昌县";
String baseManDeprtDing = "GO_9a7dce7fbaf54787998fa004f1b7c0e1";
String baseProvManDeprtDing = "GO_6c383c049d95461f9a0df780140ceb32";
String baseBasisEstablish = "中共遂昌县委办公室关于研究开发“天工”智能化管理平台(三期)的函";
String capCode = MD5.create().digestHex(timestamp + areaCode);
String url = "https://interface.zjzwfw.gov.cn/gateway/api/proxy/001003001029/dataSharing/3XN9R93Pva6db7sf.htm?" +
"requestTime=" + timestamp + "&sign=" + sign +
"&appKey=" + appKey + "&baseProjPrincipal=abc&baseProjSetYear=abc&baseProjId=abc&baseManDeprt=abc&baseProjBasis=abc&baseLowestLevel=abc&ProjPrincipalCall=abc&baseConstructionType=abc&baseProjType=abc&baseProjContacts=abc&isEffective=abc&baseConsDeprtDing=abc&baseProjSetProg=abc&baseProjContactsCall=abc&baseProjName=abc&baseProjConsClass=abc&capCode=abc&baseManDeprtDing=abc&baseProvManDeprtDing=abc&baseBasisEstablish=abc&baseAreaCode=abc&capTime=abc&baseAreaName=abc";
"&appKey=" + appKey + "&baseProjPrincipal=" + baseProjPrincipal + "" +
"&baseProjSetYear=" + baseProjSetYear + "&baseProjId=" + baseProjId +
"&baseManDeprt=" + baseManDeprt + "&baseProjBasis=" + baseProjBasis +
"&baseLowestLevel=" + baseLowestLevel + "&ProjPrincipalCall=" + ProjPrincipalCall +
"&baseConstructionType=" + baseConstructionType + "&baseProjType=" + baseProjType +
"&baseProjContacts=" + baseProjContacts + "&isEffective=" + isEffective +
"&baseConsDeprtDing=" + baseConsDeprtDing + "&baseProjSetProg=" + baseProjSetProg +
"&baseProjContactsCall=" + baseProjContactsCall + "&baseProjName=" + baseProjName +
"&baseProjConsClass=" + baseProjConsClass + "&capCode=" + capCode + "&baseManDeprtDing=" + baseManDeprtDing +
"&baseProvManDeprtDing=" + baseProvManDeprtDing + "&baseBasisEstablish=" + baseBasisEstablish +
"&baseAreaCode=" + areaCode + "&capTime=" + timestamp + "&baseAreaName=" + baseAreaName;
log.info("url :{}",url);
ResponseEntity<String> forEntity = restTemplate.getForEntity(url, String.class);
log.info(forEntity.getBody());


+ 4
- 1
pmapi/src/main/java/com/ningdatech/pmapi/provincial/service/impl/JoinReviewProvincialBureauServiceImpl.java View File

@@ -67,6 +67,9 @@ public class JoinReviewProvincialBureauServiceImpl implements IJoinReviewProvinc
@Value("${irs.province-gov.appKey}")
private String govAppKey;

@Value("${irs.province-gov.interfaceName}")
private String interfaceName;

/**
* 推送/保存 重大接口到 省局联审
* @return
@@ -152,7 +155,7 @@ public class JoinReviewProvincialBureauServiceImpl implements IJoinReviewProvinc
String appSecret = govAppSecret;
String appKey = govAppKey;
String method = HttpMethod.POST.name();
String secret = refreshTokenService.refreshToken(appKey,appSecret,govRequestTokenUrl,govRefreshTokenUrl,method);
String secret = refreshTokenService.refreshToken(appKey,appSecret,govRequestTokenUrl,govRefreshTokenUrl,interfaceName,method);
String sign = MD5.create().digestHex(appKey + secret + timeStamp * 1000);
HttpComponentsClientHttpRequestFactory factory = HttpUtil.generateHttpRequestFactory();
RestTemplate restTemplate;


+ 1
- 0
pmapi/src/main/resources/application-dev.yml View File

@@ -227,6 +227,7 @@ irs:
province-gov:
can-search: false
url: https://interface.zjzwfw.gov.cn/gateway/api/proxy/001003001029/dataSharing/62vd5jAdM0b7Gr00.htm
interfaceName: 62vd5jAdM0b7Gr00
appSecret: 496f0f2a19994f76b4fd9dae087366c7
appKey: A331101453557202109017383
interface-refresh:


+ 1
- 0
pmapi/src/main/resources/application-pre.yml View File

@@ -230,6 +230,7 @@ irs:
province-gov:
can-search: true
url: https://interface.zjzwfw.gov.cn/gateway/api/proxy/001003001029/dataSharing/62vd5jAdM0b7Gr00.htm
interfaceName: 62vd5jAdM0b7Gr00
appSecret: 496f0f2a19994f76b4fd9dae087366c7
appKey: A331101453557202109017383
interface-refresh:


+ 1
- 0
pmapi/src/main/resources/application-prod.yml View File

@@ -229,6 +229,7 @@ irs:
appKey: A331101453557202109017383
province-gov:
can-search: true
interfaceName: 62vd5jAdM0b7Gr00
url: https://interface.zjzwfw.gov.cn/gateway/api/proxy/001003001029/dataSharing/62vd5jAdM0b7Gr00.htm
appSecret: 496f0f2a19994f76b4fd9dae087366c7
appKey: A331101453557202109017383


+ 1
- 1
pmapi/src/test/java/com/ningdatech/pmapi/irs/irsTest3.java View File

@@ -65,7 +65,7 @@ public class irsTest3 extends AppTests {
String appSecret = "496f0f2a19994f76b4fd9dae087366c7";
String appKey = "A331101453557202109017383";
String method = "POST";
String secret = refreshTokenService.refreshToken(appKey,appSecret,govRequestTokenUrl,govRefreshTokenUrl,method);
String secret = refreshTokenService.refreshToken(appKey,appSecret,govRequestTokenUrl,govRefreshTokenUrl,"1",method);
String sign = CryptUtils.MD5Encode(appKey + secret + timestamp);
HttpComponentsClientHttpRequestFactory factory = HttpUtil.generateHttpRequestFactory();
RestTemplate restTemplate;


+ 1
- 0
pmapi/src/test/resources/application-dev.yml View File

@@ -227,6 +227,7 @@ irs:
province-gov:
can-search: false
url: https://interface.zjzwfw.gov.cn/gateway/api/proxy/001003001029/dataSharing/62vd5jAdM0b7Gr00.htm
interfaceName: 62vd5jAdM0b7Gr00
appSecret: 496f0f2a19994f76b4fd9dae087366c7
appKey: A331101453557202109017383
interface-refresh:


+ 1
- 0
pmapi/src/test/resources/application-pre.yml View File

@@ -230,6 +230,7 @@ irs:
province-gov:
can-search: true
url: https://interface.zjzwfw.gov.cn/gateway/api/proxy/001003001029/dataSharing/62vd5jAdM0b7Gr00.htm
interfaceName: 62vd5jAdM0b7Gr00
appSecret: 496f0f2a19994f76b4fd9dae087366c7
appKey: A331101453557202109017383
interface-refresh:


+ 1
- 0
pmapi/src/test/resources/application-prod.yml View File

@@ -229,6 +229,7 @@ irs:
appKey: A331101453557202109017383
province-gov:
can-search: true
interfaceName: 62vd5jAdM0b7Gr00
url: https://interface.zjzwfw.gov.cn/gateway/api/proxy/001003001029/dataSharing/62vd5jAdM0b7Gr00.htm
appSecret: 496f0f2a19994f76b4fd9dae087366c7
appKey: A331101453557202109017383


Loading…
Cancel
Save