From f340e848768f061d24b25b6dc1c420eec60ff37a Mon Sep 17 00:00:00 2001 From: wangw <1594593906@qq.com> Date: Thu, 6 Mar 2025 14:43:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E5=A1=AB=E9=80=80=E6=AC=BE=E5=89=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application-test.yml | 1 + .../src/main/resources/application-test.yml | 1 + .../service/impl/OrderInfoServiceImpl.java | 24 +++++++++---------- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/cash-api/account-server/src/main/resources/application-test.yml b/cash-api/account-server/src/main/resources/application-test.yml index b3dd46131..f0e630f15 100644 --- a/cash-api/account-server/src/main/resources/application-test.yml +++ b/cash-api/account-server/src/main/resources/application-test.yml @@ -30,6 +30,7 @@ dubbo: name: account-server qos-port: 22222 qos-enable: true + serialize-check-status: DISABLE registry: address: nacos://121.40.109.122:8848 # Nacos 服务地址 group: server-test diff --git a/cash-api/order-server/src/main/resources/application-test.yml b/cash-api/order-server/src/main/resources/application-test.yml index 1dd96a1b0..5e22b18fb 100644 --- a/cash-api/order-server/src/main/resources/application-test.yml +++ b/cash-api/order-server/src/main/resources/application-test.yml @@ -32,6 +32,7 @@ dubbo: name: order-server qos-port: 22232 qos-enable: true + serialize-check-status: DISABLE registry: address: nacos://121.40.109.122:8848 # Nacos 服务地址 group: server-test diff --git a/cash-service/order-service/src/main/java/com/czg/service/order/service/impl/OrderInfoServiceImpl.java b/cash-service/order-service/src/main/java/com/czg/service/order/service/impl/OrderInfoServiceImpl.java index 58dbb4f98..fa53693ab 100644 --- a/cash-service/order-service/src/main/java/com/czg/service/order/service/impl/OrderInfoServiceImpl.java +++ b/cash-service/order-service/src/main/java/com/czg/service/order/service/impl/OrderInfoServiceImpl.java @@ -300,18 +300,18 @@ public class OrderInfoServiceImpl extends ServiceImpl 0) { - if (pointSetting.getMinPaymentAmount().compareTo(newTotalAmount) > 0) { - throw new ValidateException("生成支付订单失败,未满足积分抵扣最低门槛"); - } - if (pointSetting.getMaxDeductionRatio().multiply(newTotalAmount).compareTo(param.getPointsDiscountAmount()) < 0) { - throw new ValidateException("生成支付订单失败,积分抵扣金额已超出最大抵扣金额"); - } - BigDecimal pointAmount = new BigDecimal(param.getPointsNum()).divide(new BigDecimal(pointSetting.getEquivalentPoints()), 2, RoundingMode.DOWN); - if (pointAmount.compareTo(param.getPointsDiscountAmount()) != 0) { - throw new ValidateException("生成支付订单失败,积分抵扣金额不正确"); - } - } +// if (param.getPointsNum() > 0) { +// if (pointSetting.getMinPaymentAmount().compareTo(newTotalAmount) > 0) { +// throw new ValidateException("生成支付订单失败,未满足积分抵扣最低门槛"); +// } +// if (pointSetting.getMaxDeductionRatio().multiply(newTotalAmount).compareTo(param.getPointsDiscountAmount()) < 0) { +// throw new ValidateException("生成支付订单失败,积分抵扣金额已超出最大抵扣金额"); +// } +// BigDecimal pointAmount = new BigDecimal(param.getPointsNum()).divide(new BigDecimal(pointSetting.getEquivalentPoints()), 2, RoundingMode.DOWN); +// if (pointAmount.compareTo(param.getPointsDiscountAmount()) != 0) { +// throw new ValidateException("生成支付订单失败,积分抵扣金额不正确"); +// } +// } log.info("支付前置2,订单金额{} ", newTotalAmount); newTotalAmount = newTotalAmount.subtract(param.getPointsDiscountAmount()); log.info("支付前置3,订单金额{} ", newTotalAmount);