using EntrustSettle.Controllers; using EntrustSettle.IServices; using EntrustSettle.Model; using EntrustSettle.Model.Dtos; using Microsoft.AspNetCore.Mvc; namespace EntrustSettle.Api.Controllers { /// /// 订单状态历史 /// public class OrderHistoryController : BaseApiController { private readonly IOrderHistoryService orderHistoryService; public OrderHistoryController(IOrderHistoryService orderHistoryService) { this.orderHistoryService = orderHistoryService; } /// /// 获取订单状态历史列表 /// /// 订单Id [HttpGet] public async Task>> GetOrderHistoryList(long orderId) { var result = await orderHistoryService.AsQueryable() .Where(x => x.Pid == orderId) .OrderByDescending(x => x.Id) .Select() .ToListAsync(); return Success(result); } } }