12345678910111213141516171819202122232425262728293031323334 |
- 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);
- }
- }
- }
- }
|