fix 离线判断
This commit is contained in:
@@ -298,10 +298,8 @@ public class DeviceService : IDeviceService
|
||||
var list = new List<DeviceEntity>();
|
||||
foreach (var device in devices)
|
||||
{
|
||||
if(device.HeartbeatInterval > 0)
|
||||
{
|
||||
var regis = deviceRegistrys.FirstOrDefault(x => x.DeviceUniqueNo == device.UniqueNo);
|
||||
if (regis == null)
|
||||
if (regis == null || device.HeartbeatInterval == 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -310,12 +308,7 @@ public class DeviceService : IDeviceService
|
||||
{
|
||||
list.Add(device);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
list.Add(device);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user