fix: 转桌修复 未下单不允许转桌

This commit is contained in:
张松
2024-12-17 09:18:54 +08:00
parent a1f1ff3f94
commit 099f5f58a5

View File

@@ -3429,6 +3429,9 @@ public class TbShopTableServiceImpl implements TbShopTableService {
TbCashierCart currentSeatFee = null;
ArrayList<TbCashierCart> updateCartInfos = new ArrayList<>();
for (TbCashierCart item : cashierCarts) {
if (item.getOrderId() == null) {
throw new BadRequestException("商品未下单无法转台并台");
}
if (targetSeatFee == null || !TableConstant.CART_SEAT_ID.equals(item.getProductId())) {
item.setTableId(switchTableDTO.getTargetTableId());
item.setMasterId(masterId);
@@ -3436,9 +3439,7 @@ public class TbShopTableServiceImpl implements TbShopTableService {
}
cartIds.add(item.getId());
if (item.getOrderId() != null) {
orderId = item.getOrderId();
}
orderId = item.getOrderId();
if (TableConstant.CART_SEAT_ID.equals(item.getProductId())) {
currentSeatFee = item;