diff --git a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/order/service/impl/OrderServiceImpl.java b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/order/service/impl/OrderServiceImpl.java index d18da54..b7a08d7 100644 --- a/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/order/service/impl/OrderServiceImpl.java +++ b/bonus-modules/bonus-material-mall/src/main/java/com/bonus/material/order/service/impl/OrderServiceImpl.java @@ -38,9 +38,9 @@ public class OrderServiceImpl implements OrderService { // 查询库存是否为0,是的话让它下架 orderDetailDto.setMaStatus("1"); orderMapper.updateDeviceStatus(orderDetailDto); - throw new RuntimeException(devInfo.getDeviceName() + "库存不足"); + throw new RuntimeException(devInfo.getDeviceName() + "已下架,无法下单"); }else if (devInfo.getDeviceCount() < orderDetailDto.getNum()) { - throw new RuntimeException(devInfo.getDeviceName() + "库存不足"); + throw new RuntimeException(devInfo.getDeviceName() + "库存不足,无法下单"); } else { // 改库存 orderMapper.updateDevCount(orderDetailDto);