Esempio n. 1
0
        public ComplexResponse <OrderDetailViewDto> Detail(int userId, int orderId)
        {
            var msg = ErrorMessage.失败;
            OrderDetailViewDto data = null;

            if (userId > 0 && orderId > 0)
            {
                data = _orderService.GetDetail(userId, orderId);
                if (data != null)
                {
                    var productList = _orderItemService.GetAllByOrderId(orderId);
                    data.ProductList = productList;
                }
                msg = ErrorMessage.成功;
            }

            return(new ComplexResponse <OrderDetailViewDto>((int)msg, msg.ToString(), data));
        }
Esempio n. 2
0
        public async Task <IActionResult> GetAllByOrderId(int orderId)
        {
            var response = await _service.GetAllByOrderId(orderId);

            return(StatusCode(response.Code, response));
        }