This commit is contained in:
tanglong 2025-07-29 17:07:55 +08:00
parent 3fd1e78289
commit 2a7f1816e4
9 changed files with 6 additions and 5 deletions

View File

@ -257,8 +257,8 @@ namespace YD_AllHeartRates.Api.Mqtt
totalData.QuantityOfElectricity = jumpData.QuantityOfElectricity; totalData.QuantityOfElectricity = jumpData.QuantityOfElectricity;
totalData.ScoreTime = jumpData.ScoreTime; totalData.ScoreTime = jumpData.ScoreTime;
_caching.AddObject(jumpKey, totalData, 600); _caching.AddObject(jumpKey, totalData, 60);
_caching.AddObject(rawKey, jumpData, 60); _caching.AddObject(rawKey, jumpData, 600);
} }
} }
} }

View File

@ -154,9 +154,10 @@ namespace YD_AllHeartRates.Api.Services.Impl
// 一次性获取 JumpRopeData当天数据 // 一次性获取 JumpRopeData当天数据
var jumpRopeDict = await _userContext.JumpRopeData var jumpRopeDict = await _userContext.JumpRopeData
.Where(x => studentNos.Contains(x.StudentNo) && x.ScoreTime.Date == today) .Where(x => studentNos.Contains(x.StudentNo) && x.ScoreTime.Date == today)
.GroupBy(x => x.StudentNo)
.Select(g => g.OrderByDescending(x => x.JumpValue).FirstOrDefault())
.ToDictionaryAsync(x => x.StudentNo, x => x); .ToDictionaryAsync(x => x.StudentNo, x => x);
foreach (var student in studentList) foreach (var student in studentList)
{ {
var heartRateKey = $"heartRate:{student.StudentNo}"; var heartRateKey = $"heartRate:{student.StudentNo}";

View File

@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("YD_AllHeartRates.Api")] [assembly: System.Reflection.AssemblyCompanyAttribute("YD_AllHeartRates.Api")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+6d73f0cb525ce75d808b306c79291c75a52c8508")] [assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+3fd1e78289203fe8e739bf7a66197715a077ba22")]
[assembly: System.Reflection.AssemblyProductAttribute("YD_AllHeartRates.Api")] [assembly: System.Reflection.AssemblyProductAttribute("YD_AllHeartRates.Api")]
[assembly: System.Reflection.AssemblyTitleAttribute("YD_AllHeartRates.Api")] [assembly: System.Reflection.AssemblyTitleAttribute("YD_AllHeartRates.Api")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]

View File

@ -1 +1 @@
804f64fb7352a3fccc478d8207d7524ef14b984588a90c9a9b552c3bcbad82dd dcfd3dacadd6fb55025b594106322a39b747cdc17b733600111f7fe609d4ec59