浏览代码

修改了有加密字段,且字段本身为null的情况优化

chenjiangqun 2 年之前
父节点
当前提交
22d04a8512
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      FactoryTool_CShare/Business/V2Method.cs

+ 3 - 1
FactoryTool_CShare/Business/V2Method.cs

@@ -150,7 +150,9 @@ namespace MOKA_Factory_Tools
                 mid.clienttype = jObject["clientType"].Value<string>();
                 mid.host = jObject["host"].Value<string>();
                 mid.whiteType = jObject["whiteType"].Value<string>();
-                mid.aesEncrypt = jObject["aesEncrypt"] == null ? false : jObject["aesEncrypt"].Value<string>().Equals("yes", StringComparison.OrdinalIgnoreCase);
+                string aesEncrypt = jObject["aesEncrypt"] == null ? null : jObject["aesEncrypt"].Value<string>();
+                if (aesEncrypt != null)
+                    mid.aesEncrypt = aesEncrypt.Equals("yes", StringComparison.OrdinalIgnoreCase);
                 object a = jObject["rokuCustomer"];
                 if (jObject["rokuCustomer"].ToString().Length > 0)
                 {