This commit is contained in:
tanglong 2025-07-28 15:45:40 +08:00
parent 02b030afc2
commit c614ee4005

View File

@ -174,8 +174,8 @@ namespace YD_AllHeartRates.Api.Services.Impl
await _sportsContext.AddAsync(entity); await _sportsContext.AddAsync(entity);
var res = await _sportsContext.SaveChangesAsync() > 0; var res = await _sportsContext.SaveChangesAsync() > 0;
_caching.Remove($"{AppSettings.StudentListCacheKey}_{schoolCode}");
_caching.Remove($"{AppSettings.DeviceListCacheKey}_{schoolCode}"); _caching.Remove($"{AppSettings.DeviceListCacheKey}_{schoolCode}");
_caching.Remove($"{AppSettings.StudentListCacheKey}_{schoolCode}");
return res; return res;
} }
@ -207,8 +207,8 @@ namespace YD_AllHeartRates.Api.Services.Impl
_sportsContext.Update(device); _sportsContext.Update(device);
var res = await _sportsContext.SaveChangesAsync() > 0; var res = await _sportsContext.SaveChangesAsync() > 0;
_caching.Remove($"{AppSettings.StudentListCacheKey}_{schoolCode}");
_caching.Remove($"{AppSettings.DeviceListCacheKey}_{schoolCode}"); _caching.Remove($"{AppSettings.DeviceListCacheKey}_{schoolCode}");
_caching.Remove($"{AppSettings.StudentListCacheKey}_{schoolCode}");
return res; return res;
} }
@ -227,8 +227,8 @@ namespace YD_AllHeartRates.Api.Services.Impl
_sportsContext.Device.Remove(device); _sportsContext.Device.Remove(device);
var res = await _sportsContext.SaveChangesAsync() > 0; var res = await _sportsContext.SaveChangesAsync() > 0;
_caching.Remove($"{AppSettings.StudentListCacheKey}_{schoolCode}");
_caching.Remove($"{AppSettings.DeviceListCacheKey}_{schoolCode}"); _caching.Remove($"{AppSettings.DeviceListCacheKey}_{schoolCode}");
_caching.Remove($"{AppSettings.StudentListCacheKey}_{schoolCode}");
return res; return res;
} }
@ -285,8 +285,8 @@ namespace YD_AllHeartRates.Api.Services.Impl
await _sportsContext.AddRangeAsync(deviceList); await _sportsContext.AddRangeAsync(deviceList);
var res = await _sportsContext.SaveChangesAsync() > 0; var res = await _sportsContext.SaveChangesAsync() > 0;
_caching.Remove($"{AppSettings.StudentListCacheKey}_{schoolCode}");
_caching.Remove($"{AppSettings.DeviceListCacheKey}_{schoolCode}"); _caching.Remove($"{AppSettings.DeviceListCacheKey}_{schoolCode}");
_caching.Remove($"{AppSettings.StudentListCacheKey}_{schoolCode}");
return res; return res;
} }
} }