using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using XYY.Common.Standard;
using XYY.Core.Standard.Mvc;
using XYY.Data.Model.Standard.Tracking;
using XYY.Service.Standard.TrackingService;

namespace XYY.API.Tracking.Controllers.TraceSupplementConfig
{
    [ApiController]
    [Route("tsc/[controller]")]
    public class ListController : ControllerBase
    {
        ITraceSupplementConfigService supplementConfigService;

        public ListController(ITraceSupplementConfigService supplementConfigService)
        {
            this.supplementConfigService = supplementConfigService;
        }

        /// <summary>
        /// 查询配置列表
        /// </summary>
        /// <param name="queryModel"></param>
        /// <returns></returns>
        [HttpPost]
        public async Task<ApiJsonModel<PageResult<Logistics_Trace_SupplementConfig>>> Post([FromBody] QueryModel queryModel)
        {
            var pr = await supplementConfigService.QueryConfig(queryModel);
            return ApiJsonModel<PageResult<Logistics_Trace_SupplementConfig>>.OK(pr);
        }
    }
}
