From da40946e8cf2ffb41157f5c388c525ccccaca692 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期五, 29 七月 2022 15:44:58 +0800 Subject: [PATCH] 备份 --- HDL_ON/DAL/Mqtt/MqttClient.cs | 30 ++++++++++++++++++++++++------ 1 files changed, 24 insertions(+), 6 deletions(-) diff --git a/HDL_ON/DAL/Mqtt/MqttClient.cs b/HDL_ON/DAL/Mqtt/MqttClient.cs index f5abbf2..b0c260f 100644 --- a/HDL_ON/DAL/Mqtt/MqttClient.cs +++ b/HDL_ON/DAL/Mqtt/MqttClient.cs @@ -515,12 +515,30 @@ //Tag 缃戠粶鐘舵�佽В鏋� else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.id}/app/thing/property/send") { - var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, tuyaEncryptKey); - var revString = Encoding.UTF8.GetString(bytes); - MainPage.Log($"mqtt 鐘舵�佹洿鏂�:{revString}"); - Control.Ins.UpdataFunctionStatus(revString, null, true); - //Control.Ins.MsgInfoList.Add($"mqtt 鐘舵�佹洿鏂�:{revString}"); - //Control.Ins.MsgInfoList.Add(revString + "\r\n"); + + if (Control.Ins.GatewayOnline_Local)//鏈湴閾炬帴锛岄櫎浜嗘秱楦﹁澶囨暟鎹箣澶栫殑浜戠鏁版嵁涓嶅鐞� + { + if (FunctionList.List.OtherBrandFunction.Count == 0) + { + MainPage.Log($"A鍗忚鏇存柊鐘舵��:鏈湴閾炬帴锛岄櫎浜嗘秱楦﹁澶囨暟鎹箣澶栫殑浜戠鏁版嵁涓嶅鐞�..."); + return; + } + else + { + var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, tuyaEncryptKey); + var revString = Encoding.UTF8.GetString(bytes); + MainPage.Log($"mqtt 鐘舵�佹洿鏂�:{revString}"); + Control.Ins.UpdataFunctionStatus(revString, null, true); + //Control.Ins.MsgInfoList.Add($"mqtt 鐘舵�佹洿鏂�:{revString}"); + //Control.Ins.MsgInfoList.Add(revString + "\r\n"); + //if (FunctionList.List.OtherBrandFunction.Find((obj) => obj.sid == updateTemp.sid) == null) + //{ + // return; + //} + } + } + + } //涓�绔彛鏁版嵁瑙f瀽 else -- Gitblit v1.8.0