转桌 全部商品

This commit is contained in:
2026-03-26 10:14:15 +08:00
parent e8731e1d4d
commit 82e40dc82a
2 changed files with 11 additions and 1 deletions

View File

@@ -553,6 +553,9 @@ public class OrderInfoCustomServiceImpl implements OrderInfoCustomService {
if (param.getTargetOrderId() == null && StrUtil.isBlank(param.getTargetTableCode())) {
throw new CzgException("转台失败,请选择目标台桌后转台");
}
if(param.getAllMerge()==null){
param.setAllMerge(0);
}
OrderInfo sourceOrder = orderInfoService.getById(param.getSourceOrderId());
if (sourceOrder == null || !sourceOrder.getStatus().equals(OrderStatusEnums.UNPAID.getCode())) {
throw new CzgException("转台失败,无可转订单");
@@ -595,7 +598,9 @@ public class OrderInfoCustomServiceImpl implements OrderInfoCustomService {
orderDetailService.update(orderDetailUp,
new QueryWrapper().eq(OrderDetail::getOrderId, sourceOrder.getId()).in(OrderDetail::getId, param.getDetailIds()));
}
shopTableService.updateStatus(sourceOrder.getShopId(), null, sourceOrder.getTableCode(), ShopTableStatusEnum.IDLE.getValue());
if(param.getAllMerge()==1){
shopTableService.updateStatus(sourceOrder.getShopId(), null, sourceOrder.getTableCode(), ShopTableStatusEnum.IDLE.getValue());
}
shopTableService.updateStatus(sourceOrder.getShopId(), null, targetOrder.getTableCode(), ShopTableStatusEnum.UNSETTLED.getValue());
return CzgResult.success();
}