AdminOrderController.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using System.Threading.Tasks;
  2. using GxPress.Common.Page;
  3. using GxPress.Repository.Interface.Order;
  4. using GxPress.Request.Order;
  5. using GxPress.Result.Order;
  6. using Microsoft.AspNetCore.Authorization;
  7. using Microsoft.AspNetCore.Mvc;
  8. namespace GxPress.Api.AdminControllers
  9. {
  10. /// <summary>
  11. /// 商务管理
  12. /// </summary>
  13. [Route("api/admin/admin")]
  14. [ApiController]
  15. [Authorize]
  16. public class AdminOrderController : Controller
  17. {
  18. private readonly IOrderRepository orderRepository;
  19. public AdminOrderController(IOrderRepository orderRepository)
  20. {
  21. this.orderRepository = orderRepository;
  22. }
  23. /// <summary>
  24. /// 订单管理 查询订单
  25. /// </summary>
  26. /// <param name="request"></param>
  27. /// <returns></returns>
  28. [HttpPost("list")]
  29. public async Task<PagedList<Entity.Order.Order>> GetAllOrderAsync(OrderSearchRequest request)
  30. {
  31. return await orderRepository.GetAllOrderAsync(request);
  32. }
  33. /// <summary>
  34. /// 财务中心
  35. /// </summary>
  36. /// <param name="request"></param>
  37. /// /// <returns></returns>
  38. [HttpPost("finance-list")]
  39. public async Task<OrderFinanceResult<Entity.Order.Order>> GetAllOrderFinnceAsync(OrderFinanceSearchRequest request)
  40. {
  41. return await orderRepository.GetAllOrderFinnceAsync(request);
  42. }
  43. }
  44. }