@@ -206,7 +206,7 @@ public class DingInfoPullController { | |||||
String baseProjSysCode = "A331123467587202307014177"; | String baseProjSysCode = "A331123467587202307014177"; | ||||
String baseProjName = "遂昌县-nsl-项目测试004"; | String baseProjName = "遂昌县-nsl-项目测试004"; | ||||
String baseProjId = "331123230130123412186"; | String baseProjId = "331123230130123412186"; | ||||
String requestSecret = RefreshKeyUtil.getRequestSecret(appKey, appScret); | |||||
String requestSecret = RefreshKeyUtil.getRequestSecret(appKey, appScret,timestamp); | |||||
String capCode = CryptUtils.encryptHMAC(timestamp + areaCode,"bcb4fc0f517fc168ee543fcf4d231f3b"); | String capCode = CryptUtils.encryptHMAC(timestamp + areaCode,"bcb4fc0f517fc168ee543fcf4d231f3b"); | ||||
String capTime = String.valueOf(timestamp); | String capTime = String.valueOf(timestamp); | ||||
String sign = CryptUtils.MD5Encode(appKey + requestSecret + timestamp); | String sign = CryptUtils.MD5Encode(appKey + requestSecret + timestamp); | ||||
@@ -134,7 +134,7 @@ public class AppIrsManage { | |||||
long timestamp = System.currentTimeMillis(); | long timestamp = System.currentTimeMillis(); | ||||
String areaCode = project.getAreaCode(); | String areaCode = project.getAreaCode(); | ||||
String projectName = project.getProjectName(); | String projectName = project.getProjectName(); | ||||
String requestSecret = RefreshKeyUtil.getRequestSecret(pushAppKey, pushAppScret); | |||||
String requestSecret = RefreshKeyUtil.getRequestSecret(pushAppKey, pushAppScret,timestamp); | |||||
String capCode = CryptUtils.encryptHMAC(timestamp + areaCode, "bcb4fc0f517fc168ee543fcf4d231f3b"); | String capCode = CryptUtils.encryptHMAC(timestamp + areaCode, "bcb4fc0f517fc168ee543fcf4d231f3b"); | ||||
String capTime = String.valueOf(timestamp); | String capTime = String.valueOf(timestamp); | ||||
String sign = CryptUtils.MD5Encode(pushAppKey + requestSecret + timestamp); | String sign = CryptUtils.MD5Encode(pushAppKey + requestSecret + timestamp); | ||||
@@ -195,7 +195,7 @@ public class AppIrsManage { | |||||
public JSONObject searchApp(ApiApplyDTO apply) throws NoSuchAlgorithmException { | public JSONObject searchApp(ApiApplyDTO apply) throws NoSuchAlgorithmException { | ||||
long timestamp = System.currentTimeMillis(); | long timestamp = System.currentTimeMillis(); | ||||
String appCode = apply.getAppId(); | String appCode = apply.getAppId(); | ||||
String requestSecret = RefreshKeyUtil.getRequestSecret(searchAppKey, searchAppScret); | |||||
String requestSecret = RefreshKeyUtil.getRequestSecret(searchAppKey, searchAppScret,timestamp); | |||||
String sign = CryptUtils.MD5Encode(searchAppKey + requestSecret + timestamp); | String sign = CryptUtils.MD5Encode(searchAppKey + requestSecret + timestamp); | ||||
String url = searchUrl + "?requestTime=" + timestamp + "&sign=" + sign + | String url = searchUrl + "?requestTime=" + timestamp + "&sign=" + sign + | ||||
"&appKey=" + searchAppKey + "&" + | "&appKey=" + searchAppKey + "&" + | ||||
@@ -231,7 +231,7 @@ public class AppIrsManage { | |||||
long timestamp = System.currentTimeMillis(); | long timestamp = System.currentTimeMillis(); | ||||
String areaCode = StringUtils.isNotBlank(apply.getAreaCode()) ? | String areaCode = StringUtils.isNotBlank(apply.getAreaCode()) ? | ||||
convertAreaCode(apply.getAreaCode()) : null; | convertAreaCode(apply.getAreaCode()) : null; | ||||
String requestSecret = RefreshKeyUtil.getRequestSecret(searchAppKey, searchAppScret); | |||||
String requestSecret = RefreshKeyUtil.getRequestSecret(searchAppKey, searchAppScret,timestamp); | |||||
String sign = CryptUtils.MD5Encode(searchAppKey + requestSecret + timestamp); | String sign = CryptUtils.MD5Encode(searchAppKey + requestSecret + timestamp); | ||||
String url = searchUrl + "?requestTime=" + timestamp + "&sign=" + sign + | String url = searchUrl + "?requestTime=" + timestamp + "&sign=" + sign + | ||||
"&appKey=" + searchAppKey + "&pageSize=1000&" + | "&appKey=" + searchAppKey + "&pageSize=1000&" + | ||||
@@ -1,6 +1,5 @@ | |||||
package com.ningdatech.pmapi.irs.manage; | package com.ningdatech.pmapi.irs.manage; | ||||
import com.alibaba.fastjson.JSONArray; | |||||
import com.alibaba.fastjson.JSONObject; | import com.alibaba.fastjson.JSONObject; | ||||
import com.ningdatech.irs.service.IRefreshTokenService; | import com.ningdatech.irs.service.IRefreshTokenService; | ||||
import com.ningdatech.pmapi.common.util.CryptUtils; | import com.ningdatech.pmapi.common.util.CryptUtils; | ||||
@@ -10,7 +9,6 @@ import lombok.RequiredArgsConstructor; | |||||
import lombok.extern.slf4j.Slf4j; | import lombok.extern.slf4j.Slf4j; | ||||
import org.apache.commons.lang3.StringUtils; | import org.apache.commons.lang3.StringUtils; | ||||
import org.springframework.beans.factory.annotation.Value; | import org.springframework.beans.factory.annotation.Value; | ||||
import org.springframework.http.HttpMethod; | |||||
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.stereotype.Component; | import org.springframework.stereotype.Component; | ||||
@@ -58,7 +56,7 @@ public class ProjectIrsManage { | |||||
*/ | */ | ||||
public JSONObject searchCoreBiz(String businessName,String orgCode,Integer limit,Integer page) { | public JSONObject searchCoreBiz(String businessName,String orgCode,Integer limit,Integer page) { | ||||
long timestamp = System.currentTimeMillis(); | long timestamp = System.currentTimeMillis(); | ||||
String secret = RefreshKeyUtil.getRequestSecret(appKey, appSecret); | |||||
String secret = RefreshKeyUtil.getRequestSecret(appKey, appSecret,timestamp); | |||||
String sign = null; | String sign = null; | ||||
try{ | try{ | ||||
sign = CryptUtils.MD5Encode(appKey + secret + timestamp); | sign = CryptUtils.MD5Encode(appKey + secret + timestamp); | ||||
@@ -78,7 +78,7 @@ public class IrsTest extends AppTests { | |||||
String appKey = "A331101453557202109017383"; | String appKey = "A331101453557202109017383"; | ||||
String appCode = "A331123467587202307014177";//A331123467587202307014171 | String appCode = "A331123467587202307014177";//A331123467587202307014171 | ||||
String requestSecret = RefreshKeyUtil.getRequestSecret(appKey, appScret); | |||||
String requestSecret = RefreshKeyUtil.getRequestSecret(appKey, appScret,timestamp); | |||||
String sign = CryptUtils.MD5Encode(appKey + requestSecret + timestamp); | String sign = CryptUtils.MD5Encode(appKey + requestSecret + timestamp); | ||||
String url = "https://interface.zjzwfw.gov.cn/gateway/api/001003001029/dataSharing/XS8daav3bcemZ3Ra.htm?" + | String url = "https://interface.zjzwfw.gov.cn/gateway/api/001003001029/dataSharing/XS8daav3bcemZ3Ra.htm?" + | ||||
"requestTime=" + timestamp + "&sign=" + sign + "&appKey=" + appKey + "&name=&" + | "requestTime=" + timestamp + "&sign=" + sign + "&appKey=" + appKey + "&name=&" + | ||||
@@ -99,7 +99,7 @@ public class IrsTest extends AppTests { | |||||
String baseProjSysCode = "A331123467587202307014177"; | String baseProjSysCode = "A331123467587202307014177"; | ||||
String baseProjName = "遂昌县-nsl-项目测试004"; | String baseProjName = "遂昌县-nsl-项目测试004"; | ||||
String baseProjId = "331123230130123412186"; | String baseProjId = "331123230130123412186"; | ||||
String requestSecret = RefreshKeyUtil.getRequestSecret(appKey, appScret); | |||||
String requestSecret = RefreshKeyUtil.getRequestSecret(appKey, appScret,timestamp); | |||||
String capCode = CryptUtils.MD5Encode(timestamp + areaCode); | String capCode = CryptUtils.MD5Encode(timestamp + areaCode); | ||||
String capTime = String.valueOf(timestamp); | String capTime = String.valueOf(timestamp); | ||||
String sign = CryptUtils.MD5Encode(appKey + requestSecret + timestamp); | String sign = CryptUtils.MD5Encode(appKey + requestSecret + timestamp); | ||||