细节调整
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))
|
.WhereIF(!string.IsNullOrEmpty(key), s => s.Name.Contains(key) || s.DeviceSN.Contains(key))
|
||||||
.OrderByDescending(s => s.Id)
|
.OrderByDescending(s => s.Id)
|
||||||
.ToPageListAsync(pageNum, pageSize, total);
|
.ToPageListAsync(pageNum, pageSize, total);
|
||||||
|
foreach (var item in items)
|
||||||
items.ForEach(async s =>
|
|
||||||
{
|
{
|
||||||
var status = await _redisService.ExistsAsync(RedisKeyList.DeviceStatus(s.DeviceSN));
|
item.online = await _redisService.ExistsAsync(RedisKeyList.DeviceStatus(item.DeviceSN));
|
||||||
s.online = status;
|
}
|
||||||
});
|
|
||||||
return new ApiResult()
|
return new ApiResult()
|
||||||
{
|
{
|
||||||
data = new
|
data = new
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue