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