转桌并桌修改

This commit is contained in:
张松
2024-12-24 16:24:34 +08:00
parent 45b5f8638d
commit 59370ed8bd

View File

@@ -3450,7 +3450,7 @@ public class TbShopTableServiceImpl implements TbShopTableService {
}
allCarts = mpCashierCartService.getByShopEatType(shopEatTypeInfoDTO, switchTableDTO.getMasterId(), switchTableDTO.getOrderId(),
true, TableConstant.OrderInfo.Status.CREATE, TableConstant.OrderInfo.Status.RETURN);
true, TableConstant.OrderInfo.Status.CREATE);
TbCashierCart seatCart = null;
for (TbCashierCart allCart : allCarts) {
@@ -3535,6 +3535,8 @@ public class TbShopTableServiceImpl implements TbShopTableService {
// 删除原有台桌detail和order信息
if (orderId != null && (switchTableDTO.isFull() || cashierCarts.size() == allCarts.size())) {
mpOrderInfoService.removeById(orderId);
mpCashierCartService.remove(new LambdaQueryWrapper<TbCashierCart>().eq(TbCashierCart::getOrderId, orderId));
mpOrderDetailService.remove(new LambdaQueryWrapper<TbOrderDetail>().eq(TbOrderDetail::getOrderId, orderId));
}
if (!switchTableDTO.isFull() && cashierCarts.size() != allCarts.size()) {