From 1e9b528570b537facadd7129819caf4c9e1c56bc Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Tue, 9 Jul 2024 18:01:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/hfkj/service/order/impl/BsOrderServiceImpl.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/service/src/main/java/com/hfkj/service/order/impl/BsOrderServiceImpl.java b/service/src/main/java/com/hfkj/service/order/impl/BsOrderServiceImpl.java index b0174a7..2bee58a 100644 --- a/service/src/main/java/com/hfkj/service/order/impl/BsOrderServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/order/impl/BsOrderServiceImpl.java @@ -250,9 +250,14 @@ public class BsOrderServiceImpl implements BsOrderService { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "暂不支持多商户商品下单"); } + if (order.getPayRealPrice().compareTo(new BigDecimal("0")) <= 0) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "当前不支持0元购买"); + } + // 订单入库 editData(order); + if (order.getOrderStatus().equals(OrderStatusEnum.status1.getCode())) { // 10分钟内未支付,自动取消订单 Message rocketMsg = MessageBuilder.withPayload(order).build();