From be81427dad76e417b9f15ad93229883649a2732b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A3=B7=E5=8F=B6?= <14103883+leaf-phos@user.noreply.gitee.com> Date: Sat, 15 Mar 2025 14:43:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=98=9F=E9=A9=BF=E4=BB=98=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/ruoyi/common/pay/xy/service/XyWxPayService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/smart-switch-ruoyi/smart-switch-common/src/main/java/com/ruoyi/common/pay/xy/service/XyWxPayService.java b/smart-switch-ruoyi/smart-switch-common/src/main/java/com/ruoyi/common/pay/xy/service/XyWxPayService.java index b6746d96..7eadda6d 100644 --- a/smart-switch-ruoyi/smart-switch-common/src/main/java/com/ruoyi/common/pay/xy/service/XyWxPayService.java +++ b/smart-switch-ruoyi/smart-switch-common/src/main/java/com/ruoyi/common/pay/xy/service/XyWxPayService.java @@ -15,6 +15,7 @@ import com.wechat.pay.java.service.payments.jsapi.model.PrepayWithRequestPayment import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; +import java.math.RoundingMode; import java.time.LocalDate; import java.time.LocalDateTime; import java.util.Arrays; @@ -40,7 +41,7 @@ public class XyWxPayService implements PayApi { params.put("agetId", payConfig.getAgetId()); params.put("custId", payConfig.getCustId()); params.put("orderNo", payable.payableOutTradeNo()); - params.put("txamt", payable.payableFen()); + params.put("txamt", String.valueOf(payable.payableFen().intValue())); params.put("openid", payable.payableOpenId()); params.put("payWay", XyPayConstants.PAY_WAY_WX); params.put("traType", XyPayConstants.TRA_TYPE_MINI_PROGRAM);