转桌问题

This commit is contained in:
2026-03-27 10:22:50 +08:00
parent 4a4b2a88cc
commit 1534c537d5

View File

@@ -561,6 +561,7 @@ public class OrderInfoCustomServiceImpl implements OrderInfoCustomService {
if (sourceOrder == null || !sourceOrder.getStatus().equals(OrderStatusEnums.UNPAID.getCode())) {
throw new CzgException("转台失败,无可转订单");
}
String sourceTableCode = sourceOrder.getTableCode();
OrderInfo targetOrder = orderInfoService.getOne(QueryWrapper.create().eq(OrderInfo::getId, param.getTargetOrderId())
.eq(OrderInfo::getTableCode, param.getTargetTableCode())
.eq(OrderInfo::getStatus, OrderStatusEnums.UNPAID.getCode()));
@@ -599,7 +600,7 @@ public class OrderInfoCustomServiceImpl implements OrderInfoCustomService {
}
}
if(param.getAllMerge()==1){
shopTableService.updateStatus(sourceOrder.getShopId(), null, sourceOrder.getTableCode(), ShopTableStatusEnum.IDLE.getValue());
shopTableService.updateStatus(sourceOrder.getShopId(), null, sourceTableCode, ShopTableStatusEnum.IDLE.getValue());
}
shopTableService.updateStatus(sourceOrder.getShopId(), null, targetOrder.getTableCode(), ShopTableStatusEnum.UNSETTLED.getValue());
return CzgResult.success();