ss
This commit is contained in:
parent
bd96de2331
commit
1b404c0d71
@ -272,15 +272,11 @@ namespace YD_XinWei.Api.Services.Impl
|
||||
s.Rank,
|
||||
s.ScoreTime
|
||||
})
|
||||
.Take(50)
|
||||
.ToListAsync();
|
||||
|
||||
// 2. 内存分组取每个学生最新一条
|
||||
var latestPerStudent = sourceData
|
||||
.GroupBy(s => s.StudentNo)
|
||||
.Select(g => g.First()) // 因为前面按 ScoreTime 排过
|
||||
.OrderBy(s => s.ScoreTime)
|
||||
.Take(50)
|
||||
.ToList();
|
||||
var latestPerStudent = sourceData.OrderBy(x=>x.ScoreTime).ToList();
|
||||
|
||||
// 3. 映射到 DTO
|
||||
var realTimeResults = latestPerStudent
|
||||
|
@ -14,7 +14,7 @@ using System.Reflection;
|
||||
[assembly: System.Reflection.AssemblyCompanyAttribute("YD_XinWei.Api")]
|
||||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
||||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+f5873892e13dd05303d2e1923728ae8145db3bb6")]
|
||||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+bd96de2331a7d666a4d8e2b114e0470a03d1866f")]
|
||||
[assembly: System.Reflection.AssemblyProductAttribute("YD_XinWei.Api")]
|
||||
[assembly: System.Reflection.AssemblyTitleAttribute("YD_XinWei.Api")]
|
||||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
||||
|
@ -1 +1 @@
|
||||
1b55e451e5df8b5cfbeba624584454d98ac4b71c594cd85758e5968810368ab3
|
||||
a7d3edef1797f546d7f154e83ba45b815ed5461c833e6055d7e38cbb05ed0590
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user