转桌问题
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user