diff --git a/YD_AllHeartRates.Api/Services/Impl/LargeScreenService.cs b/YD_AllHeartRates.Api/Services/Impl/LargeScreenService.cs index ebbba1b..00b485e 100644 --- a/YD_AllHeartRates.Api/Services/Impl/LargeScreenService.cs +++ b/YD_AllHeartRates.Api/Services/Impl/LargeScreenService.cs @@ -154,28 +154,28 @@ namespace YD_AllHeartRates.Api.Services.Impl var jumpRope = _caching.Get(jumpRopeKey); // ❗心率缓存未命中 → 单独查数据库 - if (heartRate == null) - { - heartRate = await _userContext.HeartRateData - .Where(x => x.StudentNo == student.StudentNo && x.ScoreTime >= tenMinutesAgo) - .OrderByDescending(x => x.ScoreTime) - .FirstOrDefaultAsync(); + //if (heartRate == null) + //{ + // heartRate = await _userContext.HeartRateData + // .Where(x => x.StudentNo == student.StudentNo && x.ScoreTime >= tenMinutesAgo) + // .OrderByDescending(x => x.ScoreTime) + // .FirstOrDefaultAsync(); - //if (heartRate != null) - // _caching.AddObject(heartRateKey, heartRate, 60); - } + // //if (heartRate != null) + // // _caching.AddObject(heartRateKey, heartRate, 60); + //} // ❗跳绳缓存未命中 → 单独查数据库 - if (jumpRope == null) - { - jumpRope = await _userContext.JumpRopeData - .Where(x => x.StudentNo == student.StudentNo && x.ScoreTime.Date == now.Date) - .OrderByDescending(x => x.ScoreTime) - .FirstOrDefaultAsync(); + //if (jumpRope == null) + //{ + // jumpRope = await _userContext.JumpRopeData + // .Where(x => x.StudentNo == student.StudentNo && x.ScoreTime.Date == now.Date) + // .OrderByDescending(x => x.ScoreTime) + // .FirstOrDefaultAsync(); - //if (jumpRope != null) - // _caching.AddObject(jumpRopeKey, jumpRope, 60); - } + // //if (jumpRope != null) + // // _caching.AddObject(jumpRopeKey, jumpRope, 60); + //} // 心率强度判断 int strength = heartRate?.Strength ?? 0;