diff --git a/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/shopimpl/TbShopTableServiceImpl.java b/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/shopimpl/TbShopTableServiceImpl.java index 5f3ab61c..46e2d9b5 100644 --- a/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/shopimpl/TbShopTableServiceImpl.java +++ b/eladmin-system/src/main/java/cn/ysk/cashier/service/impl/shopimpl/TbShopTableServiceImpl.java @@ -2045,6 +2045,10 @@ public class TbShopTableServiceImpl implements TbShopTableService { orderDetail.setStatus("refunding"); } + if (returnAmount.compareTo(BigDecimal.ZERO) <= 0) { + throw new BadRequestException("退款金额必须大于0"); + } + // 保存剩余未退款的订单详情 if (!remainOrderDetailList.isEmpty()) { mpOrderDetailService.saveBatch(remainOrderDetailList);