/// <summary> /// 获取订单相关信息 /// </summary> /// <param name="orderId"></param> /// <returns></returns> public JsonResult GetOrderInfo(int orderId) { var res = new Response() { Data = null, Successed = false }; if (ModelState.IsValid) { try { var ordTabList = _orderRepository.GetOrderTableListBy(orderId, SearchTypeBy.订单Id); var tabIdList = ordTabList.Select(x => x.R_Table_Id).ToList(); CheckOutOrderDTO order = _checkOutService.GetCheckOutOrderDTO(orderId, tabIdList, OrderTableStatus.所有); OrderSearchDTO orderSearchDTO = new OrderSearchDTO(order); res.Data = orderSearchDTO; res.Successed = true; } catch (Exception e) { res.Message = e.Message; } } else { res.Message = string.Join(",", ModelState.SelectMany(ms => ms.Value.Errors).Select(e => e.ErrorMessage)); } return(Json(res, JsonRequestBehavior.AllowGet)); }
private CheckOutOrderDTO GetCheckOutOrder(CheckoutReqDTO checkoutReqDTO) { CheckOutOrderDTO checkoutOrder = _checkOutService.GetCheckOutOrderDTO(checkoutReqDTO.OrderId, checkoutReqDTO.TableIds, checkoutReqDTO.OrderTableStatus); return(checkoutOrder); }