细节调整
This commit is contained in:
parent
5fb29db7e9
commit
a61dfeddb0
|
|
@ -47,12 +47,10 @@ 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 =>
|
||||
foreach (var item in items)
|
||||
{
|
||||
var status = await _redisService.ExistsAsync(RedisKeyList.DeviceStatus(s.DeviceSN));
|
||||
s.online = status;
|
||||
});
|
||||
item.online = await _redisService.ExistsAsync(RedisKeyList.DeviceStatus(item.DeviceSN));
|
||||
}
|
||||
return new ApiResult()
|
||||
{
|
||||
data = new
|
||||
|
|
|
|||
Loading…
Reference in New Issue