fix: 修复记录时间

This commit is contained in:
橙子
2025-03-11 22:00:11 +08:00
parent 8ef91ebd03
commit 85ed4df1e4
3 changed files with 20 additions and 17 deletions

View File

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