fix 代码优化
This commit is contained in:
@@ -29,6 +29,11 @@ public class DeviceGroupTreeResponse
|
||||
/// </summary>
|
||||
public DeviceTypeEnumType? Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string Remark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 分组类型描述
|
||||
/// </summary>
|
||||
|
||||
@@ -85,10 +85,32 @@ public class DevicePageResponse
|
||||
/// </summary>
|
||||
public bool Enable { get; set; }
|
||||
|
||||
|
||||
//*********************************************************附加信息**************************************************************/
|
||||
|
||||
/// <summary>
|
||||
/// 最后心跳时间
|
||||
/// </summary>
|
||||
public DateTime? LastHeartbeatTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否在线
|
||||
/// </summary>
|
||||
public bool IsOnline { get; set; }
|
||||
public bool IsOnline
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!LastHeartbeatTime.HasValue)
|
||||
return false;
|
||||
else
|
||||
{
|
||||
if (HeartbeatInterval <= 0)
|
||||
return true;
|
||||
else
|
||||
return LastHeartbeatTime.Value.AddSeconds(HeartbeatInterval * 3) >= DateTime.Now;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 消费总额
|
||||
@@ -103,7 +125,7 @@ public class DevicePageResponse
|
||||
/// <summary>
|
||||
/// 营业点code
|
||||
/// </summary>
|
||||
public string BusinessPlaceCode { get; set; }
|
||||
public Guid? BusinessPlaceCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 营业点名称
|
||||
|
||||
Reference in New Issue
Block a user