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);