Commit a6e13fa8 by 翁国栋

更改appid统一使用

parent 95ff7bfd
......@@ -55,6 +55,14 @@ public class CallBackContorll {
@Value("${insure.batchToPayUrl}")
private String batchToPayUrl;
@Value("${insure.appid}")
private String appid;
@Value("${insure.secret}")
private String secret;
@Value("${insure.appidq}")
private String appidq;
@Value("${insure.secretq}")
private String secretq;
/*支付回调*/
@Value("${pay_page}")
......@@ -112,7 +120,7 @@ public class CallBackContorll {
InsurePolicy insurePolicy = InsurePolicy.builder().id(insureUserList.get(0).getPolicyId()).build().selectById();
InsureApplicant insureApplicant = InsureApplicant.builder().build().selectOne(new QueryWrapper<InsureApplicant>().lambda().eq(InsureApplicant::getOrgCode, insurePolicy.getOrgCode()));
String value = DigestUtils.md5Hex(pid + insureApplicant.getSecretq() + timestamp + sb.toString());
String value = DigestUtils.md5Hex(pid + secretq + timestamp + sb.toString());
if (!value.equals(sign)) {
throw new CustomException("增员核保回调验签失败");
}
......@@ -201,7 +209,7 @@ public class CallBackContorll {
}
InsurePolicy insurePolicy = InsurePolicy.builder().build().selectOne(new QueryWrapper<InsurePolicy>().lambda().eq(InsurePolicy::getPolicyNo, list.get(0).getPolicyNo()));
InsureApplicant insureApplicant = InsureApplicant.builder().build().selectOne(new QueryWrapper<InsureApplicant>().lambda().eq(InsureApplicant::getOrgCode, insurePolicy.getOrgCode()));
String value = DigestUtils.md5Hex(pid + insureApplicant.getSecretq() + timestamp + sb.toString());
String value = DigestUtils.md5Hex(pid + secretq + timestamp + sb.toString());
if (!value.equals(sign)) {
throw new CustomException("保全增员申请回调验签失败");
}
......@@ -312,7 +320,7 @@ public class CallBackContorll {
InsurePay insurePay = InsurePay.builder().build().selectOne(new QueryWrapper<InsurePay>().lambda().eq(InsurePay::getSerialNumber, callBack.getSerial_number()));
InsurePolicy insurePolicy = InsurePolicy.builder().build().selectOne(new QueryWrapper<InsurePolicy>().lambda().eq(InsurePolicy::getId, insurePay.getPolicyId()));
InsureApplicant insureApplicant = InsureApplicant.builder().build().selectOne(new QueryWrapper<InsureApplicant>().lambda().eq(InsureApplicant::getOrgCode, insurePolicy.getOrgCode()));
String value = DigestUtils.md5Hex(pid + insureApplicant.getSecret() + timestamp + sb.toString());
String value = DigestUtils.md5Hex(pid + secret + timestamp + sb.toString());
if (!value.equals(sign)) {
throw new CustomException("投保支付收银台回调验签失败");
}
......@@ -331,7 +339,7 @@ public class CallBackContorll {
paramsMap.put("sign", sign);
Map bodyMap = Maps.newHashMap();
bodyMap.put("quotation_id", callBack.getSerial_number());
String data = HttpUtils.sendPost(getPolicyUrl, InsureContorll.setParams(JSONObject.toJSONString(bodyMap), insureApplicant.getAppid(), insureApplicant.getSecret()), bodyMap);
String data = HttpUtils.sendPost(getPolicyUrl, InsureContorll.setParams(JSONObject.toJSONString(bodyMap), appid, secret), bodyMap);
Map dataMap = JSONObject.parseObject(data, Map.class);
if (dataMap.size() > 0) {
if (dataMap.get("errcode").toString().equals("suc") || dataMap.get("errcode").toString().equals("e25")) {
......@@ -340,7 +348,7 @@ public class CallBackContorll {
insurePolicy.setUpdateTime(new Date());
insurePolicy.updateById();
}
InsureLog.builder().requestParam(JSONObject.toJSONString(InsureContorll.setParams(JSONObject.toJSONString(bodyMap), insureApplicant.getAppid(), insureApplicant.getSecret()))).type(7)
InsureLog.builder().requestParam(JSONObject.toJSONString(InsureContorll.setParams(JSONObject.toJSONString(bodyMap), appid, secret))).type(7)
.requestData(JSONObject.toJSONString(bodyMap)).createTime(new Date()).requestType(1).returnBody(data).requestPath(getPolicyUrl)
.returnCode(dataMap.get("errcode").toString()).policyId(insurePay.getPolicyId()).returnMsg(dataMap.get("errmsg").toString()).build().insert();
}
......@@ -371,7 +379,7 @@ public class CallBackContorll {
// InsurePay insurePay = InsurePay.builder().build().selectOne(new QueryWrapper<InsurePay>().lambda().eq(InsurePay::getSerialNumber, callBack.getSerial_number()));
InsurePolicy insurePolicy = InsurePolicy.builder().build().selectOne(new QueryWrapper<InsurePolicy>().lambda().eq(InsurePolicy::getSerialNumber,callBack.getSerial_number()));
InsureApplicant insureApplicant = InsureApplicant.builder().build().selectOne(new QueryWrapper<InsureApplicant>().lambda().eq(InsureApplicant::getOrgCode, insurePolicy.getOrgCode()));
String value = DigestUtils.md5Hex(pid + insureApplicant.getSecret() + timestamp + sb.toString());
String value = DigestUtils.md5Hex(pid + secret + timestamp + sb.toString());
if (!value.equals(sign)) {
throw new CustomException("保单出单回调验签失败");
}
......@@ -429,7 +437,7 @@ public class CallBackContorll {
InsurePay insurePay = InsurePay.builder().build().selectOne(new QueryWrapper<InsurePay>().lambda().eq(InsurePay::getSerialNumber, callBack.getOrder_import_uuid()));
InsurePolicy insurePolicy = InsurePolicy.builder().build().selectOne(new QueryWrapper<InsurePolicy>().lambda().eq(InsurePolicy::getId, insurePay.getPolicyId()));
InsureApplicant insureApplicant = InsureApplicant.builder().build().selectOne(new QueryWrapper<InsureApplicant>().lambda().eq(InsureApplicant::getOrgCode, insurePolicy.getOrgCode()));
String value = DigestUtils.md5Hex(pid + insureApplicant.getAppidq() + timestamp + sb.toString());
String value = DigestUtils.md5Hex(pid + appidq + timestamp + sb.toString());
if (!value.equals(sign)) {
throw new CustomException("增员支付回调验签失败");
}
......
......@@ -283,9 +283,9 @@ h5:
url: 'http://javays.com'
insure:
#投保 appid
# appid: '1002305000010094276'
# #投保 secret
# secret: '51e405c74bd9514e1955a92520786286'
appid: '1002305000010094276'
#投保 secret
secret: '51e405c74bd9514e1955a92520786286'
#投保上传文件
uploadUrl: 'http://sandbox.portal.unistar-ins.com/service/Home/Index/fileUpload'
#投保立即出单
......@@ -304,9 +304,9 @@ insure:
issue: 'http://sandbox.portal.unistar-ins.com/cps/Labor/Policy/issue'
#保全appid
# appidq: '1000115041006006938'
# #保全 secret
# secretq: '6ba1bf4aa0bd14368c95ff0b9934a17b'
appidq: '1000115041006006938'
#保全 secret
secretq: '6ba1bf4aa0bd14368c95ff0b9934a17b'
#保全上传文件
uploadUrlq: 'http://sandbox.portal.unistar-ins.com/fuli/Home/Index/file_upload'
#保全申请
......
......@@ -254,10 +254,10 @@ wxgzh:
encodingAesKey: 'chAbt69dLAtk8HH0oGMuZwHzK2SuhnxZI5Jbzc4nNzX'
insure:
# #投保 appid
# appid: '1002303100602312445'
# #投保 secret
# secret: 'acb329868c31d5b3ba03de40dac13dd9'
#投保 appid
appid: '1002303100602312445'
#投保 secret
secret: 'acb329868c31d5b3ba03de40dac13dd9'
#投保上传文件
uploadUrl: 'http://sandbox.portal.unistar-ins.com/service/Home/Index/fileUpload'
#投保立即出单
......@@ -275,10 +275,10 @@ insure:
#预付款出单接口
issue: 'http://sandbox.portal.unistar-ins.com/cps/Labor/Policy/issue'
# #保全appid
# appidq: '1000115041006006938'
# #保全 secret
# secretq: '6ba1bf4aa0bd14368c95ff0b9934a17b'
#保全appid
appidq: '1000115041006006938'
#保全 secret
secretq: '6ba1bf4aa0bd14368c95ff0b9934a17b'
#保全上传文件
uploadUrlq: 'http://sandbox.portal.unistar-ins.com/fuli/Home/Index/file_upload'
#保全申请
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment