设备状态调整
This commit is contained in:
parent
a474ded6a1
commit
1175c776bf
|
|
@ -47,9 +47,11 @@ namespace LY.App.Service
|
|||
.WhereIF(!string.IsNullOrEmpty(key), s => s.Name.Contains(key) || s.DeviceSN.Contains(key))
|
||||
.OrderByDescending(s => s.Id)
|
||||
.ToPageListAsync(pageNum, pageSize, total);
|
||||
|
||||
items.ForEach(async s =>
|
||||
{
|
||||
s.online = await _redisService.ExistsAsync(RedisKeyList.DeviceStatus(s.DeviceSN));
|
||||
var key= RedisKeyList.DeviceStatus(s.DeviceSN);
|
||||
s.online = await _redisService.ExistsAsync(key);
|
||||
});
|
||||
return new ApiResult()
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue