CrazyIter %!s(int64=5) %!d(string=hai) anos
pai
achega
56c68c9cce
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      HiTeachCE/Controllers/MqttController.cs

+ 2 - 2
HiTeachCE/Controllers/MqttController.cs

@@ -59,7 +59,7 @@ namespace HiTeachCE.Controllers
                     "clientId": "931dee8c-74be-4c9b-a602-c74583b0e985",
                 }
              */
-            if (request.@params.TryGetValue("deviceId", out string deviceId) && request.@params.TryGetValue("orgCode", out string orgCode) && string.IsNullOrEmpty(unionid))
+            if (request.@params.TryGetValue("deviceId", out string deviceId) && request.@params.TryGetValue("orgCode", out string orgCode) && !string.IsNullOrEmpty(unionid))
             {
                 Dictionary<string, object> dict = ActivationValid(orgCode, unionid);
                 if (dict != null && dict.TryGetValue("flag", out object flag) && bool.Parse(flag.ToString()))
@@ -107,7 +107,7 @@ namespace HiTeachCE.Controllers
             string ClientId =// new List<string>() { "fb564dde14df423cafac2085936e3b96" };
                 GetLoginUser(JwtClaimTypes.ClientId);
             string groupNum;
-            if (request.@params.TryGetValue("deviceId", out string deviceId) && string.IsNullOrEmpty(ClientId))
+            if (request.@params.TryGetValue("deviceId", out string deviceId) && !string.IsNullOrEmpty(ClientId))
             {
                 if (RedisHelper.HExists("device:" + ClientId, deviceId))
                 {