提示更新

This commit is contained in:
liang.chao 2024-12-02 15:33:38 +08:00
parent 16aa4dedd8
commit 205bfcfe6d
1 changed files with 2 additions and 2 deletions

View File

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