fix: 修复排序问题

This commit is contained in:
橙子
2025-03-14 00:10:31 +08:00
parent 4e0cc9a24a
commit bcdcca82eb

View File

@@ -97,7 +97,7 @@ namespace Yi.Framework.Stock.Application.Services
.WhereIF(input.EndTime.HasValue, p => p.RecordTime <= input.EndTime.Value) .WhereIF(input.EndTime.HasValue, p => p.RecordTime <= input.EndTime.Value)
.WhereIF(input.PeriodType.HasValue, p => p.PeriodType == input.PeriodType.Value) .WhereIF(input.PeriodType.HasValue, p => p.PeriodType == input.PeriodType.Value)
.OrderByIF(!string.IsNullOrEmpty(input.Sorting),input.Sorting) .OrderByIF(!string.IsNullOrEmpty(input.Sorting),input.Sorting)
.OrderByIF(string.IsNullOrEmpty(input.Sorting),p=>p.RecordTime,OrderByType.Desc); .OrderByIF(string.IsNullOrEmpty(input.Sorting),p=>p.RecordTime);
var list = await query var list = await query
.Select(p => new StockPriceRecordDto .Select(p => new StockPriceRecordDto