diff --git a/newadmin/admin/src/main/resources/application-dev.yml b/newadmin/admin/src/main/resources/application-dev.yml index a859188..a608bf1 100644 --- a/newadmin/admin/src/main/resources/application-dev.yml +++ b/newadmin/admin/src/main/resources/application-dev.yml @@ -10,9 +10,9 @@ spring: maxWait: 60000 redis: # redis数据库索引(默认为0),我们使用索引为3的数据库,避免和其他数据库冲突 - database: 3 + database: 1 # redis服务器地址(默认为localhost) - host: 101.37.12.135 + host: 127.0.0.1 # redis端口(默认为6379) port: 6379 # redis访问密码(默认为空) @@ -30,4 +30,12 @@ spring: servlet: multipart: max-file-size: 30MB - max-request-size: 30MB \ No newline at end of file + 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 \ No newline at end of file diff --git a/newadmin/admin/src/main/resources/application-prod.yml b/newadmin/admin/src/main/resources/application-prod.yml index a5fbc57..4d3f478 100644 --- a/newadmin/admin/src/main/resources/application-prod.yml +++ b/newadmin/admin/src/main/resources/application-prod.yml @@ -31,4 +31,12 @@ spring: servlet: multipart: max-file-size: 30MB - max-request-size: 30MB \ No newline at end of file + 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 \ No newline at end of file diff --git a/newadmin/admin/src/main/resources/application-test.yml b/newadmin/admin/src/main/resources/application-test.yml index a11283c..97daa60 100644 --- a/newadmin/admin/src/main/resources/application-test.yml +++ b/newadmin/admin/src/main/resources/application-test.yml @@ -30,4 +30,12 @@ spring: servlet: multipart: max-file-size: 30MB - max-request-size: 30MB \ No newline at end of file + 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 \ No newline at end of file diff --git a/newadmin/merchant-service-api/src/main/java/com/chaozhanggui/merchant/service/HfMerService.java b/newadmin/merchant-service-api/src/main/java/com/chaozhanggui/merchant/service/HfMerService.java index 0b0d323..7a10a27 100644 --- a/newadmin/merchant-service-api/src/main/java/com/chaozhanggui/merchant/service/HfMerService.java +++ b/newadmin/merchant-service-api/src/main/java/com/chaozhanggui/merchant/service/HfMerService.java @@ -1,19 +1,14 @@ package com.chaozhanggui.merchant.service; -import cn.hutool.core.io.FileUtil; import cn.hutool.core.util.ObjectUtil; -import cn.hutool.http.HttpRequest; 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.util.MD5Util; import com.chaozhanggui.dao.system.dao.*; import com.chaozhanggui.dao.system.entity.*; import com.chaozhanggui.merchant.util.RSAUtils; import com.chaozhanggui.merchant.util.SnowFlakeUtil; -import com.fasterxml.jackson.databind.ObjectMapper; import com.huifu.adapay.Adapay; import com.huifu.adapay.core.AdapayCore; import com.huifu.adapay.core.exception.BaseAdaPayException; @@ -25,6 +20,7 @@ import com.huifu.adapay.merchant.model.MerchantResident; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.http.HttpMethod; import org.springframework.http.ResponseEntity; import org.springframework.mock.web.MockMultipartFile; @@ -89,6 +85,20 @@ public class HfMerService { 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 provList=null; @@ -1971,7 +1981,7 @@ public class HfMerService { merchantEntryParams.put("rsa_public_key", keyMap.get(0));//商户RSA公钥 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" + " \"rate_channel\": \"wx_pub_online\",\n" + " \"fee_rate\": \"0.007\"\n" + @@ -2202,7 +2212,7 @@ public class HfMerService { image =tbPlussMerchantImageMapper.selectByMerchantCodeType(baseInfo.getMerchantcode(),"08"); MsgException.checkNull(image, "收银台照片不存在"); - Map mtzzzz=HfMerService.fileUpload(idCard.getImgnegative(),"04",record.getMerchantid()); + Map mtzzzz=HfMerService.fileUpload(image.getPicurl(),"04",record.getMerchantid()); if(ObjectUtil.isNotEmpty(mtzzzz)&&"succeeded".equals(mtzzzz.get("status"))){ sb.append("|"); sb.append(mtzzzz.get("pic_id")); @@ -2333,8 +2343,8 @@ public class HfMerService { TbPlussCitysHf district_code= tbPlussCitysHfMapper.selectByCodeAndParentCode(baseInfo.getDistrict(),city.getCityCode()); 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("notify_url","https://p40312246f.goho.co/admin/notifyCallback/feedCallBack"); + 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",backUrl); //调用sdk商户配置方法,得到商户配置返回对象 Map merchantResident = null;