acc
This commit is contained in:
parent
4b5dd2ccfc
commit
adb7a5132b
@ -127,7 +127,7 @@ namespace YD_AllHeartRates.Api.Services.Impl
|
|||||||
var studentList = _caching.Get<List<StudentDto>>(studentListKey);
|
var studentList = _caching.Get<List<StudentDto>>(studentListKey);
|
||||||
|
|
||||||
// 3. 如果缓存没有 → 查询数据库 + 写入缓存
|
// 3. 如果缓存没有 → 查询数据库 + 写入缓存
|
||||||
if (studentList == null)
|
if (studentList == null || studentList.Count == 0)
|
||||||
{
|
{
|
||||||
studentList = await _sportsContext.Student
|
studentList = await _sportsContext.Student
|
||||||
.Where(x => x.ClassId == classId && x.SchoolCode == schoolCode && x.StudentStatus == 1)
|
.Where(x => x.ClassId == classId && x.SchoolCode == schoolCode && x.StudentStatus == 1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user