更改汇付拉卡拉相关

This commit is contained in:
liuyingfang 2024-02-28 11:29:43 +08:00
parent 6c77bdecbd
commit e22ad89baf
2 changed files with 36 additions and 25 deletions

View File

@ -2377,30 +2377,40 @@ public class HfMerService {
}
TbPlussMerchantHfInfo hfInfo = new TbPlussMerchantHfInfo();
JSONObject object=new JSONObject();
if(ObjectUtil.isNotNull(wxLiteAppId)&&ObjectUtil.isNotEmpty(wxLiteAppId)){
JSONObject wxlite=new JSONObject();
wxlite.put("appid",wxLiteAppId);
object.put("wx_lite",wxlite);
}
TbPlussMerchantHfInfo hfInfo= tbPlussMerchantHfInfoMapper.selectByMerchantCode(baseInfo.getMerchantcode());
if(ObjectUtil.isEmpty(hfInfo)||hfInfo==null){
hfInfo = new TbPlussMerchantHfInfo();
JSONObject object=new JSONObject();
if(ObjectUtil.isNotNull(wxLiteAppId)&&ObjectUtil.isNotEmpty(wxLiteAppId)){
JSONObject wxlite=new JSONObject();
wxlite.put("appid",wxLiteAppId);
object.put("wx_lite",wxlite);
}
if(ObjectUtil.isNotNull(wxPubAppId)&&ObjectUtil.isNotEmpty(wxPubAppId)
&&ObjectUtil.isNotNull(wxPubPath)&&ObjectUtil.isNotEmpty(wxPubPath)
){
JSONObject wxpub=new JSONObject();
wxpub.put("appid",wxPubAppId);
wxpub.put("path",wxPubPath);
object.put("wx_pub",wxpub);
}
if(ObjectUtil.isNotNull(wxPubAppId)&&ObjectUtil.isNotEmpty(wxPubAppId)
&&ObjectUtil.isNotNull(wxPubPath)&&ObjectUtil.isNotEmpty(wxPubPath)
){
JSONObject wxpub=new JSONObject();
wxpub.put("appid",wxPubAppId);
wxpub.put("path",wxPubPath);
object.put("wx_pub",wxpub);
}
hfInfo.setMerchantCode(baseInfo.getMerchantcode());
hfInfo.setStatus("0");
hfInfo.setPrivKey(privateKey);
hfInfo.setPucKey(publicKey);
hfInfo.setWxInfo(object.toJSONString());
hfInfo.setCreateTime(new Date());
tbPlussMerchantHfInfoMapper.insert(hfInfo);
hfInfo.setMerchantCode(baseInfo.getMerchantcode());
hfInfo.setStatus("0");
hfInfo.setPrivKey(privateKey);
hfInfo.setPucKey(publicKey);
hfInfo.setWxInfo(ObjectUtil.isEmpty(object)?null:object.toJSONString());
hfInfo.setCreateTime(new Date());
tbPlussMerchantHfInfoMapper.insert(hfInfo);
}else {
hfInfo.setStatus("0");
hfInfo.setPrivKey(privateKey);
hfInfo.setPucKey(publicKey);
hfInfo.setCreateTime(new Date());
tbPlussMerchantHfInfoMapper.updateByPrimaryKeySelective(hfInfo);
}
TbPlussMerchantAuditRecord merchantAuditRecord = new TbPlussMerchantAuditRecord();
merchantAuditRecord.setStatus("1");
@ -2662,6 +2672,7 @@ public class HfMerService {
String baseUrl = it;
StringBuilder sb = new StringBuilder(baseUrl);
sb.append("?title=").append(merchantBaseInfo.getAlias());
sb.append("?type=").append("1");
sb.append("&password=").append(userInfo.getPassword().toLowerCase());
sb.append("&mcc=").append(merchantBaseInfo.getMcc());
sb.append("&mccName=").append(merchantBaseInfo.getMccname());

View File

@ -107,9 +107,9 @@ public class LklAuditService {
object1.put("merType", (baseInfo.getMerchanttype().equals(1) || baseInfo.getMerchanttype().equals("2")) ? "TP_PERSONAL" : "TP_MERCHANT"); //商户注册类型 TP_MERCHANT:企业 TP_PERSONAL:微个
object1.put("merName", baseInfo.getAlias()); //商户名称(经营名称) 不能少于七个中文
object1.put("merAddr", baseInfo.getAddress()); //去掉省市区后的详细地址
object1.put("provinceCode", tbPlussRegionLklMapper.selectByName(baseInfo.getProvince())); //省代码 通过地区信息获取地区查询接口获取 对应 code字段
object1.put("cityCode", tbPlussRegionLklMapper.selectByName(baseInfo.getCity())); // 市代码 通过地区信息获取地区查询接口获取 对应 code字段
object1.put("countyCode",tbPlussRegionLklMapper.selectByName(baseInfo.getDistrict())); // 区县代码 通过地区信息获取地区查询接口获取 对应 code字段
object1.put("provinceCode", tbPlussRegionLklMapper.selectByName(baseInfo.getProvince()).getCode()); //省代码 通过地区信息获取地区查询接口获取 对应 code字段
object1.put("cityCode", tbPlussRegionLklMapper.selectByName(baseInfo.getCity()).getCode()); // 市代码 通过地区信息获取地区查询接口获取 对应 code字段
object1.put("countyCode",tbPlussRegionLklMapper.selectByName(baseInfo.getDistrict()).getCode()); // 区县代码 通过地区信息获取地区查询接口获取 对应 code字段