From 83df0ebfbd306d0fb5a51a21a7ef2271c0c507ec Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期二, 09 三月 2021 19:39:26 +0800
Subject: [PATCH] 2021-3-9-1

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

diff --git a/HDL_ON/DAL/Mqtt/MqttClient.cs b/HDL_ON/DAL/Mqtt/MqttClient.cs
index 62d34ba..b0ba2a9 100644
--- a/HDL_ON/DAL/Mqtt/MqttClient.cs
+++ b/HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -197,10 +197,17 @@
                         Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/topo/found",
                         QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce
                     };
+                    //App璁㈤槄閬ユ帶鍣ㄨ嚜瀛︽寜閿涔犳垚鍔熼�氱煡
+                    var study = new MqttTopicFilter()
+                    {
+                        Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/event/irCodeStudyDone/up",
+                        QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce
+                    };
 
                     Utlis.WriteLine("寮�濮嬭闃咃紒");
                     var result = await RemoteMqttClient.SubscribeAsync(new MqttTopicFilter[] {
                         pirStatus,
+                         study,
                         topicFilterPush2, topicAlinkStatus });
                     if (result.Items[0].ResultCode == MQTTnet.Client.Subscribing.MqttClientSubscribeResultCode.GrantedQoS0)
                     {
@@ -291,7 +298,16 @@
                                 {
                                     var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, tuyaEncryptKey);
                                     var revString = Encoding.UTF8.GetString(bytes);
-                                    HDL_ON.UI.UI2.PersonalCenter.PirDevice.Method.addcontronsid = revString;
+                                    HDL_ON.UI.UI2.PersonalCenter.PirDevice.Method.addcontrondata = revString;
+                                    //ReceiveCheckGateway(ss);
+                                    //return;
+                                }
+                                //App璁㈤槄閬ユ帶鍣ㄨ嚜瀛︽寜閿涔犳垚鍔熼�氱煡
+                                else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/event/irCodeStudyDone/up")
+                                {
+                                    var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, tuyaEncryptKey);
+                                    var revString = Encoding.UTF8.GetString(bytes);
+                                    HDL_ON.UI.UI2.PersonalCenter.PirDevice.Method.studybtndata = revString;
                                     //ReceiveCheckGateway(ss);
                                     //return;
                                 }

--
Gitblit v1.8.0