From 9ef48d7b2da7c408b53f73be0f6eef3cbac1c84a Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期四, 19 十一月 2020 10:23:45 +0800
Subject: [PATCH] Evoyo.Home1.1.0120111601_Release

---
 ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGatewayData.cs |   32 +++++++++++++++++++++++++-------
 1 files changed, 25 insertions(+), 7 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGatewayData.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGatewayData.cs
index 1a9e97c..b27483c 100755
--- a/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGatewayData.cs
+++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGatewayData.cs
@@ -7,11 +7,7 @@
     public class ZbGatewayData
     {
         #region 涓�鍫嗗彉閲�
-        /// <summary>
-        /// 缃戝叧鍦ㄧ嚎鐨勬椂闂寸偣
-        /// </summary>
-        [Newtonsoft.Json.JsonIgnore]
-        public DateTime OnlineTime = DateTime.Now;
+
         /// <summary>
         /// 浣忓畢ID
         /// </summary>
@@ -23,7 +19,7 @@
         ///<summary>
         ///缃戝叧搴忓垪鍙凤紝璇ョ綉鍏冲敮涓�鏍囪瘑
         /// </summary>
-        public string GwId = string.Empty;
+        public string GwId = string.Empty;
         /// <summary>
         ///缃戝叧缁戝畾缃戝崱鐨刴ac鍦板潃
         /// </summary>
@@ -87,7 +83,29 @@
         /// 鏈�鍚庣殑鏇存柊鏃堕棿
         /// </summary>
         [Newtonsoft.Json.JsonIgnore]
-        public DateTime LastDateTime = DateTime.MinValue;
+        public DateTime LastDateTime = DateTime.MinValue;
+        /// <summary>
+        /// 缃戝叧鍦ㄧ嚎鐨勬椂闂寸偣(杩欎釜涓滆タ鏈夌偣鐢ㄥ,褰撶涓�娆¤幏鍙栨椂,闇�瑕佽繑鍥炲綋鍓嶆椂闂村洖鍘�,鐒跺悗鎵嶅紑濮嬭鏃�)
+        /// </summary>
+        [Newtonsoft.Json.JsonIgnore]
+        private DateTime m_OnlineTime = new DateTime(1970, 1, 1);
+        /// <summary>
+        /// 缃戝叧鍦ㄧ嚎鐨勬椂闂寸偣
+        /// </summary>
+        [Newtonsoft.Json.JsonIgnore]
+        public DateTime OnlineTime
+        {
+            get
+            {
+                if (m_OnlineTime.Year == 1970)
+                {
+                    //褰撶涓�娆¤幏鍙栨椂,闇�瑕佽繑鍥炲綋鍓嶆椂闂村洖鍘�,鐒跺悗鎵嶅紑濮嬭鏃�
+                    m_OnlineTime = DateTime.Now;
+                }
+                return m_OnlineTime;
+            }
+            set { m_OnlineTime = value; }
+        }
 
         #endregion
 

--
Gitblit v1.8.0