From 0f2e0147e8990e913d16d99bc1b94fb6bc53abd7 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期四, 03 十二月 2020 15:35:42 +0800
Subject: [PATCH] 2020-12-03-1

---
 HDL_ON/DAL/Mqtt/MqttClient.cs |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/HDL_ON/DAL/Mqtt/MqttClient.cs b/HDL_ON/DAL/Mqtt/MqttClient.cs
index 137d082..1682fc1 100644
--- a/HDL_ON/DAL/Mqtt/MqttClient.cs
+++ b/HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -9,6 +9,7 @@
 using System.Text;
 using System.Security.Cryptography;
 using HDL_ON.DriverLayer;
+using HDL_ON.Entity;
 
 namespace HDL_ON.DAL.Mqtt
 {
@@ -644,6 +645,18 @@
             {
                 MqttInfoConfig.Current.mMqttInfo = mqttInfoRequestResult_Obj;
                 await MQTTConnectAsync();
+                //1.鍒ゆ柇鏄惁缁戝畾浜嗙綉鍏筹紝鑾峰彇缃戝叧杩滅▼杩炴帴鐨勫姞瀵咾EY
+                if (DB_ResidenceData.residenceData.CheckWhetherGatewayIsBound())
+                {
+                    //2.鎵惧嚭鏄惁瀛樺湪鍖归厤褰撳墠浣忓畢鐨刴ac锛屽瓨鍦ㄥ啀杩涜杩滅▼銆�
+                    MqttInfoConfig.Current.HomeGatewayInfo = DB_ResidenceData.residenceData.HomeGateway;
+                    //3.寮�濮嬭繛鎺�
+                    await MQTTConnectAsync();
+                }
+                else
+                {
+                    Utlis.WriteLine("============>杩樻病缁戝畾缃戝叧");
+                }
             }
         }
 

--
Gitblit v1.8.0