using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using XYY.Common.Standard;
using XYY.Core.Standard.Mvc;
using XYY.Service.Standard.Order.Interfaces;

namespace XYY.API.SINO.Order.Controllers
{
    [Route("api/[controller]/[action]")]
    public class OrderController : ApiControllerBase
    {
        ISinoOrderService _sinoOrderService;

        public OrderController(ISinoOrderService sinoOrderService)
        {
            _sinoOrderService = sinoOrderService;
        }

        [HttpGet]
        [HttpPost]
        public async Task<IActionResult> Query([FromBody] QueryModel model)
        {
            var result = await _sinoOrderService.QueryPager(model);
            return Ok(result);
        }
    }
}
