From cbfd795f5f08596899006132f6782afcd52ebf5b Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Thu, 17 Nov 2022 10:49:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/cweb/controller/pay/OrderController.java | 12 +++++++++++- .../main/java/com/hai/common/utils/HttpsUtils.java | 7 ++++--- .../src/main/java/com/hai/config/WxOrderConfig.java | 6 ++++++ 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/hai-cweb/src/main/java/com/cweb/controller/pay/OrderController.java b/hai-cweb/src/main/java/com/cweb/controller/pay/OrderController.java index a3901fa0..f3c3b51c 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/pay/OrderController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/pay/OrderController.java @@ -232,7 +232,17 @@ public class OrderController { weChatPayReqInfo.setSub_appid(SysConst.getSysConfig().getWxSubAppId());//商户号 } - if (order.getHighChildOrderList().get(0).getGoodsType() == 8) { + if (order.getHighChildOrderList().get(0).getGoodsType() == 1) { + //子商户号 + weChatPayReqInfo.setSub_mch_id(SysConst.getSysConfig().getWxSubMchId()); + + HighCoupon coupon = highCouponService.getCouponById(order.getHighChildOrderList().get(0).getGoodsId()); + // 支付类型:1.微信支付 2.金币支付 + if (coupon.getCouponSource() != null && coupon.getCouponSource().equals(4)) { + weChatPayReqInfo.setSub_mch_id(WxOrderConfig.MCH_ID_1634835264); + } + + } else if (order.getHighChildOrderList().get(0).getGoodsType() == 8) { weChatPayReqInfo.setSub_mch_id(SysConst.getSysConfig().getWxGzSubMchId());//商户号 } else if (order.getHighChildOrderList().get(0).getGoodsType() == 3) { diff --git a/hai-service/src/main/java/com/hai/common/utils/HttpsUtils.java b/hai-service/src/main/java/com/hai/common/utils/HttpsUtils.java index 468ceecd..f781d35e 100644 --- a/hai-service/src/main/java/com/hai/common/utils/HttpsUtils.java +++ b/hai-service/src/main/java/com/hai/common/utils/HttpsUtils.java @@ -51,14 +51,15 @@ public class HttpsUtils { private static PoolingHttpClientConnectionManager connMgr; private static RequestConfig requestConfig; - private static final int MAX_TIMEOUT = 15000; + private static final int MAX_TIMEOUT = 10000; static { // 设置连接池 connMgr = new PoolingHttpClientConnectionManager(); // 设置连接池大小 - connMgr.setMaxTotal(100); - connMgr.setDefaultMaxPerRoute(connMgr.getMaxTotal()); + connMgr.setMaxTotal(1000); + // 并发数量 + connMgr.setDefaultMaxPerRoute(500); // Validate connections after 1 sec of inactivity connMgr.setValidateAfterInactivity(1000); RequestConfig.Builder configBuilder = RequestConfig.custom(); diff --git a/hai-service/src/main/java/com/hai/config/WxOrderConfig.java b/hai-service/src/main/java/com/hai/config/WxOrderConfig.java index 5b9dc837..1e3233ee 100644 --- a/hai-service/src/main/java/com/hai/config/WxOrderConfig.java +++ b/hai-service/src/main/java/com/hai/config/WxOrderConfig.java @@ -62,6 +62,12 @@ public class WxOrderConfig { */ public static final String MCH_ID_1619676214 = "1619676214"; + /** + * 微信支付商户号 + * 惠昕(贵州)能源有限公司 + */ + public static final String MCH_ID_1634835264 = "1634835264"; + /** * 微信支付商户号 * 渝北区浩联物资经营部