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