转桌 全部商品
This commit is contained in:
@@ -29,4 +29,9 @@ public class MergeOrderDTO implements Serializable {
|
||||
* 转台详情Id
|
||||
*/
|
||||
private List<Long> detailIds;
|
||||
|
||||
/**
|
||||
* 是否全部商品转台 0:否 1:是
|
||||
*/
|
||||
private Integer allMerge;
|
||||
}
|
||||
|
||||
@@ -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()));
|
||||
}
|
||||
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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user