From e720fc7b15ffe5acd9dde85f7484b1cd5398179a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=AD=E5=87=AF=E5=87=AF?= Date: Sat, 12 Oct 2024 15:50:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=97=E9=93=BA=E7=AE=A1=E7=90=86-=E5=BA=97?= =?UTF-8?q?=E9=93=BA=E9=85=8D=E7=BD=AE=EF=BC=9A=E6=89=93=E5=8D=B0=E6=9C=BA?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E7=9B=B8=E5=85=B3=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/cashierservice/service/PayService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/service/PayService.java b/src/main/java/com/chaozhanggui/system/cashierservice/service/PayService.java index cd3a9dd..8ea479a 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/service/PayService.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/service/PayService.java @@ -1923,6 +1923,7 @@ public class PayService { return Result.fail(CodeEnum.ORDERNOEXIST); } if (StrUtil.isNotBlank(remark)) { + orderInfo.setDiscountAmount(orderInfo.getOrderAmount().subtract(amount)); orderInfo.setRemark(remark); tbOrderInfoMapper.updateByPrimaryKey(orderInfo); } @@ -1940,6 +1941,7 @@ public class PayService { orderInfo.setPayType(payType); orderInfo.setPayAmount(amount); orderInfo.setOrderAmount(amount); + orderInfo.setDiscountAmount(BigDecimal.ZERO); orderInfo.setSendType("QR"); orderInfo.setStatus("WAIT_PAY"); orderInfo.setMerchantId(shopInfo.getMerchantId()); @@ -1983,7 +1985,7 @@ public class PayService { String reqbody = "店铺收款码"; PublicResp publicResp = thirdPayService.jspay(url, thirdApply.getAppId(), thirdApply.getAppToken(), - reqbody, reqbody, orderInfo.getOrderAmount().multiply(new BigDecimal(100)).longValue(), + reqbody, reqbody, amount.multiply(new BigDecimal(100)).longValue(), payType, thirdApply.getSmallAppid(), userId, ip, DateUtils.getSsdfTimes(), thirdApply.getStoreId(), backUrl, backUrl);