using Bowin.Common.WebModels; using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using OrderSystem.Services; using System; namespace OrderSystem.Web.Controllers { [Route("api/[controller]/[action]")] [ApiController] [Authorize] public class OrderController : ControllerBase { private IOrderService OrderService { get; set; } public OrderController(IOrderService orderService) { OrderService = orderService; } [HttpGet] public ResultMessage GetContractList(string userID) { try { return ResultMessage.Success(OrderService.GetContractList(userID)); } catch (Exception ex) { return ResultMessage.GetError(ex.Message); } } } }