fix: 转桌修复 未下单不允许转桌
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user