From 6e580804d74d7a6fb118b6ba381e88aa81f267c7 Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期一, 15 三月 2021 15:30:23 +0800 Subject: [PATCH] Merge branch 'temp-wxr' into dev-tzy --- HDL_ON/DAL/Mqtt/MqttClient.cs | 19 +++++++++++++------ 1 files changed, 13 insertions(+), 6 deletions(-) diff --git a/HDL_ON/DAL/Mqtt/MqttClient.cs b/HDL_ON/DAL/Mqtt/MqttClient.cs index a7dea34..18941e8 100644 --- a/HDL_ON/DAL/Mqtt/MqttClient.cs +++ b/HDL_ON/DAL/Mqtt/MqttClient.cs @@ -194,7 +194,7 @@ //App璁㈤槄绾㈠瀹� / 缃戝叧閬ユ帶鍣ㄦ坊鍔犳垚鍔熼�氱煡 var pirStatus = new MqttTopicFilter() { - Topic = $"/user/${DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/topo/found", + Topic = $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/topo/found", QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.AtMostOnce }; @@ -280,6 +280,12 @@ } } + //涓�浜涚壒娈婄殑涓婚澶勭悊(涓轰簡鎵ц閫熷害,灏藉彲鑳界殑鍒姞鑰楁椂鐨勬搷浣� true:鎵ц浜嗙壒娈婂鐞� false:娌℃湁鎵ц鐗规畩澶勭悊) + if (Stan.HdlCloudReceiveLogic.Current.CloudOverallMsgReceiveEx(topic, e.ApplicationMessage.Payload, mqttEncryptKey, tuyaEncryptKey) == true) + { + return; + } + if (topic == $"/BusGateWayToClient/{UserInfo.Current.ID}" + PushNotifySqueeze) { var mMes = Encoding.UTF8.GetString(e.ApplicationMessage.Payload); @@ -287,10 +293,11 @@ ReceiveNotifySqueezeAsync(mMes); } //App璁㈤槄绾㈠瀹�/缃戝叧閬ユ帶鍣ㄦ坊鍔犳垚鍔熼�氱煡 - else if (topic == $"/user/${DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/topo/found") + else if (topic == $"/user/{DB_ResidenceData.Instance.CurrentRegion.RegionID}/app/thing/topo/found") { - var ss = Encoding.UTF8.GetString(e.ApplicationMessage.Payload); - HDL_ON.UI.UI2.PersonalCenter.PirDevice.Method.addcontronsid = ss; + var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, tuyaEncryptKey); + var revString = Encoding.UTF8.GetString(bytes); + HDL_ON.UI.UI2.PersonalCenter.PirDevice.Method.addcontronsid = revString; //ReceiveCheckGateway(ss); //return; } @@ -299,13 +306,13 @@ { var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, tuyaEncryptKey); var revString = Encoding.UTF8.GetString(bytes); - Control.Ins.UpdataFunctionStatus(revString, null); + Control.Ins.UpdataFunctionStatus(revString, null,true); } //涓�绔彛鏁版嵁瑙f瀽 else { //SetGatewayOnlineResetCheck(); - var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, mqttEncryptKey); + //var bytes = Securitys.EncryptionService.AesDecryptPayload(e.ApplicationMessage.Payload, mqttEncryptKey); //bus鏁版嵁瑙f瀽 var packet = new Packet(); -- Gitblit v1.8.0