d
This commit is contained in:
parent
65874b3b86
commit
742664d994
@ -97,7 +97,7 @@ namespace YD_AllHeartRates.Api.Mqtt
|
||||
studentList = (from d in _smartSportsContext.Device
|
||||
join s in _smartSportsContext.Student on d.StudentNo equals s.StudentNo
|
||||
join c in _smartSportsContext.Class on s.ClassId equals c.Id
|
||||
where s.StudentStatus == 1
|
||||
where s.SchoolCode == AppSettings.SchoolCode && s.StudentStatus == 1
|
||||
select new StudentDto
|
||||
{
|
||||
SchoolCode = s.SchoolCode,
|
||||
@ -114,7 +114,7 @@ namespace YD_AllHeartRates.Api.Mqtt
|
||||
DeviceType = d.DeviceType,
|
||||
}).ToList();
|
||||
|
||||
devices = _smartSportsContext.Device.ToList();
|
||||
devices = _smartSportsContext.Device.Where(x => x.SchoolCode == AppSettings.SchoolCode).ToList();
|
||||
|
||||
_caching.AddObject(AppSettings.StudentListCacheKey, studentList, 28800);
|
||||
_caching.AddObject(AppSettings.DeviceListCacheKey, devices, 28800);
|
||||
|
@ -16,6 +16,8 @@
|
||||
|
||||
public static string StudentListCacheKey = "student_list";
|
||||
public static string DeviceListCacheKey = "device_list";
|
||||
public static string SchoolCode { get; set; }
|
||||
|
||||
public static void Init(IConfiguration configuration)
|
||||
{
|
||||
Logging = configuration.GetSection("Logging").Get<LoggingConfig>();
|
||||
@ -25,6 +27,7 @@
|
||||
FlushTime = configuration["FlushTime"];
|
||||
DbConnectionString = configuration["DbConnectionString"];
|
||||
SmartSportsString = configuration["SmartSportsString"];
|
||||
SchoolCode = configuration["SchoolCode"];
|
||||
RedisConnectionString = configuration["RedisConnectionString"];
|
||||
CorsUrls = configuration["CorsUrls"].Split(',');
|
||||
Mqtt = configuration.GetSection("Mqtt").Get<MqttConfig>();
|
||||
|
@ -25,6 +25,8 @@
|
||||
|
||||
"FlushTime": "2000", //大屏刷新周期
|
||||
|
||||
"SchoolCode": "202507280052",
|
||||
|
||||
"AppUrls": {
|
||||
},
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user