|
|
@@ -454,6 +454,14 @@ namespace Muchinfo.MTPClient.Infrastructure.Utilities
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
+ #region 风管云平台
|
|
|
+ /// <summary>
|
|
|
+ /// 风管云平台服务地址
|
|
|
+ /// </summary>
|
|
|
+ public static string ErmcpAddress { get; set; }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
#region 公有静态方法
|
|
|
/// <summary>
|
|
|
/// 从Config.xml读取系统配置
|
|
|
@@ -498,6 +506,7 @@ namespace Muchinfo.MTPClient.Infrastructure.Utilities
|
|
|
CanUseBackHandOpen = e.Element("CanUseBackHandOpen") != null && (bool)e.Element("CanUseBackHandOpen"),
|
|
|
CanUseQuickLockOrder = e.Element("CanUseQuickLockOrder") != null && (bool)e.Element("CanUseQuickLockOrder"),
|
|
|
PublishNetIpAddress = (string)e.Element("PublishNetIpAddress"),
|
|
|
+ ErmcpAddress = (string)e.Element("ErmcpAddress"),
|
|
|
}).FirstOrDefault();
|
|
|
|
|
|
if (config == null) return;
|
|
|
@@ -532,7 +541,8 @@ namespace Muchinfo.MTPClient.Infrastructure.Utilities
|
|
|
CanUseBackHandOpen = config.CanUseBackHandOpen;
|
|
|
CanUseQuickLockOrder = config.CanUseQuickLockOrder;
|
|
|
PublishNetIpAddress = config.PublishNetIpAddress;
|
|
|
-
|
|
|
+ ErmcpAddress = config.ErmcpAddress;
|
|
|
+
|
|
|
////初始化链路
|
|
|
InitializeLink();
|
|
|
}
|
|
|
@@ -676,6 +686,23 @@ namespace Muchinfo.MTPClient.Infrastructure.Utilities
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
|
+#region 风管云平台
|
|
|
+ /// <summary>
|
|
|
+ /// 风管云平台参数更新方法,主要是通过GO服务更新相关配置信息
|
|
|
+ /// </summary>
|
|
|
+ public static void UpdateErmcpParamete()
|
|
|
+ {
|
|
|
+ // 获取交易与行情 Host
|
|
|
+ String jsonString = HttpUtility.HttpGet(ErmcpAddress);
|
|
|
+ Dictionary<String, Object> dicJson = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<String, Object>>(jsonString);
|
|
|
+ Dictionary<String, String> dataJson = Newtonsoft.Json.JsonConvert.DeserializeObject<Dictionary<String, String>>(dicJson["data"].ToString());
|
|
|
+
|
|
|
+ LinkManager.Instance.Parameters.TradeHost = dataJson["tradeHost"];
|
|
|
+ LinkManager.Instance.Parameters.TradePort = int.Parse(dataJson["tradePort"]);
|
|
|
+ LinkManager.Instance.Parameters.QuotationHost = dataJson["quoteHost"];
|
|
|
+ LinkManager.Instance.Parameters.QuotationPort = int.Parse(dataJson["quotePort"]);
|
|
|
+ }
|
|
|
+#endregion
|
|
|
|
|
|
public static LockType _LockType = LockType.UnLock;// 锁定商品
|
|
|
|
|
|
@@ -909,5 +936,6 @@ namespace Muchinfo.MTPClient.Infrastructure.Utilities
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
}
|
|
|
}
|