提交代码

dev-discount
胡锐 2 years ago
parent 704d1c246b
commit ad8cdb27cf
  1. 29
      hai-service/src/main/java/com/hai/config/CommonSysConfig.java
  2. 10
      hai-service/src/main/java/com/hai/config/JinZhuJiaYouService.java
  3. 5
      hai-service/src/main/resources/dev/commonConfig.properties
  4. 5
      hai-service/src/main/resources/pre/commonConfig.properties
  5. 5
      hai-service/src/main/resources/prod-9401/commonConfig.properties
  6. 5
      hai-service/src/main/resources/prod/commonConfig.properties

@ -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;
}

@ -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<String,Object> param) throws Exception {
// 请求头部
Map<String, Object> 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<String, Object> 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");

@ -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

@ -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

@ -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

@ -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

Loading…
Cancel
Save