修改配置

This commit is contained in:
韩鹏辉
2024-01-13 14:06:45 +08:00
parent 53afd54de8
commit ae925b0ebb
4 changed files with 48 additions and 14 deletions

View File

@@ -10,9 +10,9 @@ spring:
maxWait: 60000 maxWait: 60000
redis: redis:
# redis数据库索引默认为0我们使用索引为3的数据库避免和其他数据库冲突 # redis数据库索引默认为0我们使用索引为3的数据库避免和其他数据库冲突
database: 3 database: 1
# redis服务器地址默认为localhost # redis服务器地址默认为localhost
host: 101.37.12.135 host: 127.0.0.1
# redis端口默认为6379 # redis端口默认为6379
port: 6379 port: 6379
# redis访问密码默认为空 # redis访问密码默认为空
@@ -30,4 +30,12 @@ spring:
servlet: servlet:
multipart: multipart:
max-file-size: 30MB max-file-size: 30MB
max-request-size: 30MB max-request-size: 30MB
hf:
account:
backUrl: http://gw.sxczgkj.cn/admin/notifyCallback/feedCallBack
wxLite:
appId: wxfc7bd92a462eb191
wxPub:
appId: wxfc7bd92a462eb191
path: http://admintestapi.sxczgkj.cn/wap/api/trans/pay

View File

@@ -31,4 +31,12 @@ spring:
servlet: servlet:
multipart: multipart:
max-file-size: 30MB max-file-size: 30MB
max-request-size: 30MB max-request-size: 30MB
hf:
account:
backUrl: http://newadminapi.sxczgkj.cn/admin/notifyCallback/feedCallBack
wxLite:
appId: wxfc7bd92a462eb191
wxPub:
appId: wxfc7bd92a462eb191
path: https://ky.sxczgkj.cn/wap/api/trans/pay

View File

@@ -30,4 +30,12 @@ spring:
servlet: servlet:
multipart: multipart:
max-file-size: 30MB max-file-size: 30MB
max-request-size: 30MB max-request-size: 30MB
hf:
account:
backUrl: http://newadminapi.sxczgkj.cn/admin/notifyCallback/feedCallBack
wxLite:
appId: wxfc7bd92a462eb191
wxPub:
appId: wxfc7bd92a462eb191
path: https://ky.sxczgkj.cn/wap/api/trans/pay

View File

@@ -1,19 +1,14 @@
package com.chaozhanggui.merchant.service; package com.chaozhanggui.merchant.service;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.http.HttpRequest;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.chaozhanggui.common.system.config.MsgException; import com.chaozhanggui.common.system.config.MsgException;
import com.chaozhanggui.common.system.util.MD5Util; import com.chaozhanggui.common.system.util.MD5Util;
import com.chaozhanggui.dao.system.dao.*; import com.chaozhanggui.dao.system.dao.*;
import com.chaozhanggui.dao.system.entity.*; import com.chaozhanggui.dao.system.entity.*;
import com.chaozhanggui.merchant.util.RSAUtils; import com.chaozhanggui.merchant.util.RSAUtils;
import com.chaozhanggui.merchant.util.SnowFlakeUtil; import com.chaozhanggui.merchant.util.SnowFlakeUtil;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.huifu.adapay.Adapay; import com.huifu.adapay.Adapay;
import com.huifu.adapay.core.AdapayCore; import com.huifu.adapay.core.AdapayCore;
import com.huifu.adapay.core.exception.BaseAdaPayException; import com.huifu.adapay.core.exception.BaseAdaPayException;
@@ -25,6 +20,7 @@ import com.huifu.adapay.merchant.model.MerchantResident;
import lombok.SneakyThrows; import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpMethod; import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.mock.web.MockMultipartFile; import org.springframework.mock.web.MockMultipartFile;
@@ -89,6 +85,20 @@ public class HfMerService {
TbPlussMerchantImageMapper tbPlussMerchantImageMapper; TbPlussMerchantImageMapper tbPlussMerchantImageMapper;
@Value("${hf.account.backUrl}")
private String backUrl;
@Value("${hf.account.wxLite.appId}")
private String wxLiteAppId;
@Value("${hf.account.wxPub.appId}")
private String wxPubAppId;
@Value("${hf.account.wxPub.path}")
private String wxPubPath;
private static List<Prov> provList=null; private static List<Prov> provList=null;
@@ -1971,7 +1981,7 @@ public class HfMerService {
merchantEntryParams.put("rsa_public_key", keyMap.get(0));//商户RSA公钥 merchantEntryParams.put("rsa_public_key", keyMap.get(0));//商户RSA公钥
merchantEntryParams.put("entry_mer_type", baseInfo.getMerchanttype().equals("3")?"1":"2");//1-企业2-小微。默认为企业 merchantEntryParams.put("entry_mer_type", baseInfo.getMerchanttype().equals("3")?"1":"2");//1-企业2-小微。默认为企业
merchantEntryParams.put("notify_url", "https://p40312246f.goho.co/admin/notifyCallback/feedCallBack"); merchantEntryParams.put("notify_url", backUrl);
merchantEntryParams.put("fee_rate_list","[{\n" + merchantEntryParams.put("fee_rate_list","[{\n" +
" \"rate_channel\": \"wx_pub_online\",\n" + " \"rate_channel\": \"wx_pub_online\",\n" +
" \"fee_rate\": \"0.007\"\n" + " \"fee_rate\": \"0.007\"\n" +
@@ -2202,7 +2212,7 @@ public class HfMerService {
image =tbPlussMerchantImageMapper.selectByMerchantCodeType(baseInfo.getMerchantcode(),"08"); image =tbPlussMerchantImageMapper.selectByMerchantCodeType(baseInfo.getMerchantcode(),"08");
MsgException.checkNull(image, "收银台照片不存在"); MsgException.checkNull(image, "收银台照片不存在");
Map<String,Object> mtzzzz=HfMerService.fileUpload(idCard.getImgnegative(),"04",record.getMerchantid()); Map<String,Object> mtzzzz=HfMerService.fileUpload(image.getPicurl(),"04",record.getMerchantid());
if(ObjectUtil.isNotEmpty(mtzzzz)&&"succeeded".equals(mtzzzz.get("status"))){ if(ObjectUtil.isNotEmpty(mtzzzz)&&"succeeded".equals(mtzzzz.get("status"))){
sb.append("|"); sb.append("|");
sb.append(mtzzzz.get("pic_id")); sb.append(mtzzzz.get("pic_id"));
@@ -2333,8 +2343,8 @@ public class HfMerService {
TbPlussCitysHf district_code= tbPlussCitysHfMapper.selectByCodeAndParentCode(baseInfo.getDistrict(),city.getCityCode()); TbPlussCitysHf district_code= tbPlussCitysHfMapper.selectByCodeAndParentCode(baseInfo.getDistrict(),city.getCityCode());
merchantEntryParams.put("district_code", district_code.getCityCode());//区县编码 黄埔310101 merchantEntryParams.put("district_code", district_code.getCityCode());//区县编码 黄埔310101
merchantEntryParams.put("add_value_list", " {\"wx_lite\":{\"appid\":\"wxfc7bd92a462eb191\"},\"wx_scan\":\"\", \"alipay\":\"\",\"alipay_wap\":\"\",\"alipay_lite\":\"\",\"alipay_qr\":\"\",\"alipay_scan\":\"\"}"); merchantEntryParams.put("add_value_list", " {\"wx_lite\":{\"appid\":\""+wxLiteAppId+"\"},\"wx_pub\":{\"appid\":\""+wxPubAppId+"\",\"path\":\""+wxPubPath+"\"},\"wx_scan\":\"\", \"alipay\":\"\",\"alipay_wap\":\"\",\"alipay_lite\":\"\",\"alipay_qr\":\"\",\"alipay_scan\":\"\"}");
merchantEntryParams.put("notify_url","https://p40312246f.goho.co/admin/notifyCallback/feedCallBack"); merchantEntryParams.put("notify_url",backUrl);
//调用sdk商户配置方法得到商户配置返回对象 //调用sdk商户配置方法得到商户配置返回对象
Map<String, Object> merchantResident = null; Map<String, Object> merchantResident = null;