From a367a286ce66dfea4a7170c8cf8a7a818286e3cf Mon Sep 17 00:00:00 2001 From: wangw <1594593906@qq.com> Date: Mon, 19 Jan 2026 11:09:07 +0800 Subject: [PATCH] =?UTF-8?q?v3=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/czg/service/market/service/impl/BaseWx.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cash-service/market-service/src/main/java/com/czg/service/market/service/impl/BaseWx.java b/cash-service/market-service/src/main/java/com/czg/service/market/service/impl/BaseWx.java index f0e297c15..f327cc093 100644 --- a/cash-service/market-service/src/main/java/com/czg/service/market/service/impl/BaseWx.java +++ b/cash-service/market-service/src/main/java/com/czg/service/market/service/impl/BaseWx.java @@ -5,7 +5,6 @@ import cn.hutool.core.util.StrUtil; import cn.hutool.http.HttpRequest; import cn.hutool.http.HttpUtil; import com.alibaba.fastjson2.JSONObject; -import com.czg.constants.ParamCodeCst; import com.czg.exception.CzgException; import com.czg.service.RedisService; import com.ijpay.core.IJPayHttpResponse; @@ -35,7 +34,6 @@ import java.security.cert.X509Certificate; import java.util.Base64; import java.util.Locale; import java.util.Map; -import java.util.Set; /** * 微信支付相关 @@ -139,12 +137,13 @@ public abstract class BaseWx { JSONObject jsonObject = JSONObject.parseObject(body); String prepayId = jsonObject.getString("prepay_id"); if (StrUtil.isBlank(prepayId)) { - throw new RuntimeException(jsonObject.getString("message")); + throw new CzgException(jsonObject.getString("message")); } return WxPayKit.jsApiCreateSign(config.appId, prepayId, config.privateKey); } catch (Exception e) { - throw new RuntimeException(e); + log.error("微信V3原生支付失败", e); + throw new CzgException("暂无法支付,请联系管理员"); } }