diff --git a/hai-service/src/main/java/com/hai/config/CommonSysConfig.java b/hai-service/src/main/java/com/hai/config/CommonSysConfig.java index 9503e86d..44cf0163 100644 --- a/hai-service/src/main/java/com/hai/config/CommonSysConfig.java +++ b/hai-service/src/main/java/com/hai/config/CommonSysConfig.java @@ -27,6 +27,11 @@ public class CommonSysConfig { private String shellPlatMerchantId; private String shellPlatMerchantKey; + // 金猪参数 + private String jzAppId; + private String jzPrivateKeyUrl; + private String jzPublicKeyUrl; + private String qinzhuUrl; private String qinzhuUrlToken; private String qinzhuHtmlUrl; @@ -94,6 +99,30 @@ public class CommonSysConfig { private String unionSecret; private String unionRsaKey; + public String getJzAppId() { + return jzAppId; + } + + public void setJzAppId(String jzAppId) { + this.jzAppId = jzAppId; + } + + public String getJzPrivateKeyUrl() { + return jzPrivateKeyUrl; + } + + public void setJzPrivateKeyUrl(String jzPrivateKeyUrl) { + this.jzPrivateKeyUrl = jzPrivateKeyUrl; + } + + public String getJzPublicKeyUrl() { + return jzPublicKeyUrl; + } + + public void setJzPublicKeyUrl(String jzPublicKeyUrl) { + this.jzPublicKeyUrl = jzPublicKeyUrl; + } + public String getHuiliantongDistributorId() { return huiliantongDistributorId; } diff --git a/hai-service/src/main/java/com/hai/config/JinZhuJiaYouService.java b/hai-service/src/main/java/com/hai/config/JinZhuJiaYouService.java index caf9d88c..8cbb5bc7 100644 --- a/hai-service/src/main/java/com/hai/config/JinZhuJiaYouService.java +++ b/hai-service/src/main/java/com/hai/config/JinZhuJiaYouService.java @@ -28,6 +28,12 @@ public class JinZhuJiaYouService { private final static String reqUrl = "http://api.jianshiyun.com/api/gateway"; + private final static String appId = CommonSysConst.getSysConfig().getJzAppId(); + + private final static String privateKeyUrl = CommonSysConst.getSysConfig().getJzPrivateKeyUrl(); + + private final static String publicKeyUrl = CommonSysConst.getSysConfig().getJzPublicKeyUrl(); + @Resource private BsTripartiteReqLogService reqLogService; @@ -111,7 +117,7 @@ public class JinZhuJiaYouService { private JSONObject request(String service, Map param) throws Exception { // 请求头部 Map heard = new HashMap<>(); - heard.put("Request-App-Id", "app_xiaohan_test_01"); + heard.put("Request-App-Id", appId); heard.put("Request-Service-Name", service); heard.put("Request-Signature", generateSign(param)); @@ -139,7 +145,7 @@ public class JinZhuJiaYouService { * @throws Exception */ private static String generateSign(final Map data) throws IOException { - PrivateKey privateKey = PemUtil.loadPrivateKey(new FileInputStream("/home/project/hsg/jzKey.key")); + PrivateKey privateKey = PemUtil.loadPrivateKey(new FileInputStream(privateKeyUrl)); String signStr = null; try { Signature sign = Signature.getInstance("SHA256withRSA"); diff --git a/hai-service/src/main/resources/dev/commonConfig.properties b/hai-service/src/main/resources/dev/commonConfig.properties index ec2f1aa3..8cb3044b 100644 --- a/hai-service/src/main/resources/dev/commonConfig.properties +++ b/hai-service/src/main/resources/dev/commonConfig.properties @@ -14,6 +14,11 @@ shellGroupPartnerId=S0302208021401950202 shellPlatMerchantId=S0302206141001919666 shellPlatMerchantKey=pic1yj2l3zby5ywpznrtdz7458ce2soj +# JinZhu configuration parameters +jzAppId=app_xiaohan_test_01 +jzPrivateKeyUrl=/home/project/hsg/fileKey/JzPrivateKey.key +jzPublicKeyUrl=/home/project/hsg/fileKey/JzPublicKey.key + # ???? qinzhuUrl=https://live-test.qianzhu8.com qinzhuUrlToken=https://live-test.qianzhu8.com/gateway diff --git a/hai-service/src/main/resources/pre/commonConfig.properties b/hai-service/src/main/resources/pre/commonConfig.properties index f864f1c9..15f3ac1f 100644 --- a/hai-service/src/main/resources/pre/commonConfig.properties +++ b/hai-service/src/main/resources/pre/commonConfig.properties @@ -14,6 +14,11 @@ shellGroupPartnerId=S0302207281600105753 shellPlatMerchantId=S0302206141000105717 shellPlatMerchantKey=wqisfmkzea6mwd7ogbyh3488jv0hqhdj +# JinZhu configuration parameters +jzAppId=app_xiaohan_test_01 +jzPrivateKeyUrl=/home/project/hsg/fileKey/JzPrivateKey.key +jzPublicKeyUrl=/home/project/hsg/fileKey/JzPublicKey.key + qinzhuUrl=https://live.qianzhu8.com qinzhuUrlToken=https://live.qianzhu8.com/gateway qinzhuHtmlUrl=https://qz.dctpay.com diff --git a/hai-service/src/main/resources/prod-9401/commonConfig.properties b/hai-service/src/main/resources/prod-9401/commonConfig.properties index aafdb1b6..717d2462 100644 --- a/hai-service/src/main/resources/prod-9401/commonConfig.properties +++ b/hai-service/src/main/resources/prod-9401/commonConfig.properties @@ -17,6 +17,11 @@ shellGroupPartnerId=S0302208021401950202 shellPlatMerchantId=S0302206141001919666 shellPlatMerchantKey=pic1yj2l3zby5ywpznrtdz7458ce2soj +# JinZhu configuration parameters +jzAppId=app_xiaohan_test_01 +jzPrivateKeyUrl=/home/project/hsg/fileKey/JzPrivateKey.key +jzPublicKeyUrl=/home/project/hsg/fileKey/JzPublicKey.key + qinzhuUrl=https://live.qianzhu8.com qinzhuUrlToken=https://live.qianzhu8.com/gateway qinzhuHtmlUrl=https://qz.dctpay.com diff --git a/hai-service/src/main/resources/prod/commonConfig.properties b/hai-service/src/main/resources/prod/commonConfig.properties index 9814d7af..e6614bf2 100644 --- a/hai-service/src/main/resources/prod/commonConfig.properties +++ b/hai-service/src/main/resources/prod/commonConfig.properties @@ -17,6 +17,11 @@ shellGroupPartnerId=S0302208021401950202 shellPlatMerchantId=S0302206141001919666 shellPlatMerchantKey=pic1yj2l3zby5ywpznrtdz7458ce2soj +# JinZhu configuration parameters +jzAppId=app_xiaohan_test_01 +jzPrivateKeyUrl=/home/project/hsg/fileKey/JzPrivateKey.key +jzPublicKeyUrl=/home/project/hsg/fileKey/JzPublicKey.key + qinzhuUrl=https://live.qianzhu8.com qinzhuUrlToken=https://live.qianzhu8.com/gateway qinzhuHtmlUrl=https://qz.dctpay.com