Преглед на файлове

Merge branch 'master' of http://git.ius.plus:88/Project-Wing/WingCloudServer

Conflicts:
	src/InteractionCenter/VinnoServerService.cs
	src/Plugin/ServerListPlugin.cs
denny преди 2 години
родител
ревизия
7e7327e9ec

+ 13 - 13
src/InteractionCenter/VinnoServerService.cs

@@ -134,7 +134,7 @@ namespace WingCloudServer.InteractionCenter
         }
 
         /// <summary>
-        /// åˆ�始åŒ
+        /// åˆ�始åŒ
         /// </summary>
         public override void Load(JsonRpcClientPool jsonRpcClientPool)
         {
@@ -146,7 +146,7 @@ namespace WingCloudServer.InteractionCenter
         }
 
         /// <summary>
-        /// 加载ServerInfo到内存
+        /// 加载ServerInfo到内å­
         /// </summary>
         /// <returns></returns>
         private void LoadDBServerInfo()
@@ -219,21 +219,21 @@ namespace WingCloudServer.InteractionCenter
         {
             //这里应该是批�查询,请求�数�改
             var list = new List<ServerInfoDTO>();
-            var serverInformationList = CacheMaintenance.Instance.Get<IDistributedServerInfosManager>()
-            .Where(x => !string.IsNullOrEmpty(x.Name) && !string.IsNullOrEmpty(x.ServerUrl))?.ToList();
-            if (serverInformationList != null && serverInformationList.Any())
-            {
-                list = serverInformationList.Select(c => new ServerInfoDTO()
-                {
-                    Name = c.Name,
-                    Host = c.ServerUrl
-                }).ToList();
-            }
+            // var serverInformationList = CacheMaintenance.Instance.Get<IDistributedServerInfosManager>()
+            // .Where(x => !string.IsNullOrEmpty(x.Name) && !string.IsNullOrEmpty(x.ServerUrl))?.ToList();
+            // if (serverInformationList != null && serverInformationList.Any())
+            // {
+            //     list = serverInformationList.Select(c => new ServerInfoDTO()
+            //     {
+            //         Name = c.Name,
+            //         Host = c.ServerUrl
+            //     }).ToList();
+            // }
             return await Task.FromResult(list);
         }
 
         /// <summary>
-        /// 测速接�
+        /// 测速接接�
         /// </summary>
         /// <returns></returns>
         public async Task<EchoResult> EchoAsync()

+ 120 - 74
src/Plugin/ServerListPlugin.cs

@@ -17,6 +17,8 @@ using WingInterfaceLibrary.Enum;
 using WingInterfaceLibrary.Interface;
 using WingInterfaceLibrary.Request.Authentication;
 using WingInterfaceLibrary.Result.Device;
+using WingServerCommon.Config;
+using WingServerCommon.Config.Parameters;
 using WingServerCommon.Interfaces.Cache;
 using WingServerCommon.Log;
 using WingServerCommon.Service;
@@ -41,8 +43,20 @@ namespace WingCloudServer.Plugin
         protected IAuthenticationService _authenticationService;
         private string _apiName = string.Empty;
 
+        private string _ipLocationServiceUrl = ConfigurationManager.GetParammeter<StringParameter>("FastServer", "IpLocationServiceUrl").Value;
+
+        private bool _isUsePositionService = ConfigurationManager.GetParammeter<BoolParameter>("FastServer", "IsUsePositionService").Value;
+
+        private const string _china = "中国";
+
+        private const string _hongKong = "香港";
+
+        private const string _macao = "澳门";
+
+        private const string _taiwan = "�湾";
+
         /// <summary>
-        /// �始化
+        /// åˆ�始åŒ
         /// </summary>
         public override void Load(JsonRpcClientPool jsonRpcClientPool)
         {
@@ -51,9 +65,9 @@ namespace WingCloudServer.Plugin
         }
 
         /// <summary>
-        /// å‰�处ç�
+        /// å‰�处ç�
         /// </summary>
-        /// <param name="context">上下文</param>
+        /// <param name="context">上下æ–/param>
         /// <param name="requestData">请求�数</param>
         /// <returns></returns>
         public PluginProcessResult PreProcess(IJsonRpcHttpContext context, byte[] requestData)
@@ -65,28 +79,36 @@ namespace WingCloudServer.Plugin
         }
 
         /// <summary>
-        /// å�Žå¤„ç�
+        /// å�Žå¤„ç�
         /// </summary>
-        /// <param name="context">上下文</param>
+        /// <param name="context">上下æ–/param>
         /// <param name="responseData">�应�数</param>
         /// <returns></returns>
         public PluginProcessResult PostProcess(IJsonRpcHttpContext context, byte[] responseData)
         {
             try
             {
+                if (_apiName != "IVinnoServerService/GetServerInfoListAsync")
+                {
+                    return new PluginProcessResult(responseData, false);
+                }
                 var ipAddress = context.RemoteEndPoint?.Address.ToString();
                 var ipLongAddress = IpToLong(ipAddress);
                 var serverInformationList = CacheMaintenance.Instance.Get<IDistributedServerInfosManager>()
                 .Where(x => !string.IsNullOrEmpty(x.Name) && !string.IsNullOrEmpty(x.ServerUrl))?.ToList();
                 var fasterServerInfo = new ServerInfoDTO();
                 var parallelOption = new ParallelOptions() { MaxDegreeOfParallelism = 4 };
-                //本地IP段检索
-                Parallel.ForEach(serverInformationList, parallelOption, (item, parallelLoopState) => {
-                    if (item.AssignClientIPList != null && item.AssignClientIPList.Any()) {
+                //本地IP段检ç´
+                Parallel.ForEach(serverInformationList, parallelOption, (item, parallelLoopState) =>
+                {
+                    if (item.AssignClientIPList != null && item.AssignClientIPList.Any())
+                    {
                         var ipInfo = item.AssignClientIPList.Find(c => c.LongStartIP >= ipLongAddress && c.LongEndIP <= ipLongAddress);
-                        if (ipInfo != null && !string.IsNullOrEmpty(ipInfo.StartIp)) {
+                        if (ipInfo != null && !string.IsNullOrEmpty(ipInfo.StartIp))
+                        {
                             //本地库找到此IP
-                            fasterServerInfo = new ServerInfoDTO() {
+                            fasterServerInfo = new ServerInfoDTO()
+                            {
                                 Name = item.Name,
                                 Host = item.ServerUrl
                             };
@@ -96,63 +118,84 @@ namespace WingCloudServer.Plugin
                     }
                 });
                 List<ServerInfoDTO> list = new List<ServerInfoDTO>();
-                if (fasterServerInfo != null && !string.IsNullOrEmpty(fasterServerInfo.Name)) {
+                if (fasterServerInfo != null && !string.IsNullOrEmpty(fasterServerInfo.Name))
+                {
                     //找到,直接返回
                     list.Add(fasterServerInfo);
-                    //添加其他�务器
-                    var otherServerList = serverInformationList.FindAll(c => c.Name != fasterServerInfo.Name).Select(c => new ServerInfoDTO() {
+                    //添加其他æœ�务å™
+                    var otherServerList = serverInformationList.FindAll(c => c.Name != fasterServerInfo.Name).Select(c => new ServerInfoDTO()
+                    {
                         Name = c.Name,
                         Host = c.ServerUrl,
                     }).ToList();
                     list.AddRange(otherServerList);
                 }
-                else {
-                    //没找到,定�,计算,更新,返回
+                else if (_isUsePositionService)//是�开�第三方定��务
+                {
+                    //没找到,定ä½�,计算,更新,返å›
                     var locationInfo = GetIpLocationInfo(ipAddress);
-                    if (locationInfo.ad_info != null && !string.IsNullOrEmpty(locationInfo.ad_info.nation)) {
-                        if (locationInfo.ad_info.nation == "中国") {
+                    if (locationInfo.ad_info != null && !string.IsNullOrEmpty(locationInfo.ad_info.nation))
+                    {
+                        if (locationInfo.ad_info.nation == _china 
+                        && !locationInfo.ad_info.province.Contains(_hongKong)
+                        && !locationInfo.ad_info.province.Contains(_macao)
+                        && !locationInfo.ad_info.province.Contains(_taiwan))
+                        {
                             //最快指�北京,
-                            var fastServerInfo = serverInformationList.FindAll(c => c.Name.Contains("北京") || c.Name.Contains("BJ"))?.Select(c => new ServerInfoDTO() {
+                            var fastServerInfo = serverInformationList.FindAll(c => c.Name.Contains("北京") || c.Name.Contains("BJ"))?.Select(c => new ServerInfoDTO()
+                            {
                                 Name = c.Name,
                                 Host = c.ServerUrl,
                             })?.FirstOrDefault() ?? new ServerInfoDTO();
                             list.Add(fastServerInfo);
-                            //添加其他�务器
-                            var otherServerList = serverInformationList.FindAll(c => c.Name != fastServerInfo.Name).Select(c => new ServerInfoDTO() {
+                            //添加其他æœ�务å™
+                            var otherServerList = serverInformationList.FindAll(c => c.Name != fastServerInfo.Name).Select(c => new ServerInfoDTO()
+                            {
                                 Name = c.Name,
                                 Host = c.ServerUrl,
                             }).ToList();
                             list.AddRange(otherServerList);
                         }
-                        else 
+                        else
                         {
                             var extendList = new List<ServerInfoExtend>();
-                            foreach(var item in serverInformationList) {
-                                //计算最短�离
-                                double beelineDistanceTemp = GetDistance(locationInfo.location.lat, locationInfo.location.lng, 0,0);//item.lat, item.lng);
-                                var extendInfo = new ServerInfoExtend() {
+                            foreach (var item in serverInformationList)
+                            {
+                                //计算最短è·�ç¦
+                                double beelineDistanceTemp = GetDistance(locationInfo.location.lat, locationInfo.location.lng, Convert.ToDouble(item.Lat), Convert.ToDouble(item.Lng));
+                                var extendInfo = new ServerInfoExtend()
+                                {
                                     Name = item.Name,
                                     Host = item.ServerUrl,
                                     BeelineDistance = beelineDistanceTemp
                                 };
                                 extendList.Add(extendInfo);
                             }
-                            list = extendList.OrderBy(c => c.BeelineDistance).Select(e => new ServerInfoDTO() {
+                            list = extendList.OrderBy(c => c.BeelineDistance).Select(e => new ServerInfoDTO()
+                            {
                                 Name = e.Name,
                                 Host = e.Host,
                             }).ToList();
                         }
                     }
-                    else {
-                        //啥也没找到,默认优先香港�务器[主�务器]
-                        list = serverInformationList.OrderBy(c => c.IsMaster).Select(e => new ServerInfoDTO() {
-                            Name = e.Name,
-                            Host = e.ServerUrl,
-                        }).ToList();
-                    }
                 }
-                
-                //todo 处�输出数�
+                else
+                {
+                    //啥也没找到,默认优先香港�务器[主�务器]
+                    list = serverInformationList.OrderBy(c => c.IsMaster).Select(e => new ServerInfoDTO()
+                    {
+                        Name = e.Name,
+                        Host = e.ServerUrl,
+                    }).ToList();
+                }
+                //处�输出数�
+                var responses = JsonRpcCodec.DecodeResponsesAsync(responseData, new CancellationToken()).Result;
+                var rpcResults = new List<JsonRpcLite.Services.JsonRpcResponse>();
+                var rpcResulut = new JsonRpcLite.Services.JsonRpcResponse(responses[0].Id);
+                rpcResulut.WriteResult(list);
+                rpcResults.Add(rpcResulut);
+                responseData = JsonRpcCodec.EncodeResponsesAsync(rpcResults.ToArray(), new System.Threading.CancellationToken()).Result;
+                return new PluginProcessResult(responseData, false);
             }
             catch (Exception ex)
             {
@@ -160,7 +203,7 @@ namespace WingCloudServer.Plugin
             }
             return new PluginProcessResult(responseData, false);
         }
-    
+
         /// <summary>
         /// ip地�转long
         /// </summary>
@@ -175,13 +218,13 @@ namespace WingCloudServer.Plugin
         }
 
         /// <summary>
-        /// 计算两点�置的�离,返回两点的�离,�� 米
-        /// 该公�为GOOGLE�供,误差�于0.2米
+        /// 计算两点ä½�置的è·�离,返回两点的è·�离,å�•ä½� ç±
+        /// 该公å¼�为GOOGLEæ��供,误差å°�äº.2ç±
         /// </summary>
-        /// <param name="lat1">第一点纬度</param>
-        /// <param name="lng1">第一点�度</param>
-        /// <param name="lat2">第二点纬度</param>
-        /// <param name="lng2">第二点�度</param>
+        /// <param name="lat1">第一点纬åº/param>
+        /// <param name="lng1">第一点ç»�åº/param>
+        /// <param name="lat2">第二点纬åº/param>
+        /// <param name="lng2">第二点ç»�åº/param>
         /// <returns></returns>
         public double GetDistance(double lat1, double lng1, double lat2, double lng2)
         {
@@ -194,7 +237,7 @@ namespace WingCloudServer.Plugin
             double result = 2 * Math.Asin(Math.Sqrt(Math.Pow(Math.Sin(a / 2), 2) + Math.Cos(radLat1) * Math.Cos(radLat2) * Math.Pow(Math.Sin(b / 2), 2))) * EARTH_RADIUS;
             return result;
         }
- 
+
         /// <summary>
         /// �纬度转化�弧度
         /// </summary>
@@ -206,33 +249,36 @@ namespace WingCloudServer.Plugin
         }
 
         /// <summary>
-        /// 获�ip的定�信�
+        /// 获å�–ip的定ä½�ä¿¡æ�
         /// </summary>
         /// <param name="d"></param>
         /// <returns></returns>
-        private IPServiceResult GetIpLocationInfo(string ip) {
+        private IPServiceResult GetIpLocationInfo(string ip)
+        {
             IPServiceResult info = new IPServiceResult();
-            string key = "4Z3BZ-L5RK6-MJ5SC-EXNFA-3V7PH-RSB3U";//此处�改��置
-            var url = $"https://apis.map.qq.com/ws/location/v1/ip?ip={ip}&key={key}";
+            var url = string.Format(_ipLocationServiceUrl, ip);
             try
             {
                 var json = HttpGet(url);
-                if (!string.IsNullOrEmpty(json)) {
+                if (!string.IsNullOrEmpty(json))
+                {
                     var serviceGuideInfo = JsonConvert.DeserializeObject<IPServiceGuide>(json);
-                    if (serviceGuideInfo != null && serviceGuideInfo.status == 0 && serviceGuideInfo.result != null) 
+                    if (serviceGuideInfo != null && serviceGuideInfo.status == 0 && serviceGuideInfo.result != null)
                     {
                         info = serviceGuideInfo.result;
                     }
                 }
             }
-            catch(Exception ex) {
+            catch (Exception ex)
+            {
                 //异常处�
+                Logger.WriteLineError($"GetIpLocationInfo err:{ex},{ex.StackTrace}");
             }
             return info;
         }
 
         /// <summary>
-        /// 处�http GET请求,返回数�
+        /// 处ç�†http GET请求,返回数æ�
         /// </summary>
         /// <param name="url">请求的url地�</param>
         /// <returns>http GET�功�返回的数�,失败抛WebException异常</returns>
@@ -244,20 +290,20 @@ namespace WingCloudServer.Plugin
             HttpWebRequest request = null;
             HttpWebResponse response = null;
 
-            //请求url以获�数�
+            //请求url以获å�–æ•°æ�
             try
             {
                 //设置最大连接数
                 ServicePointManager.DefaultConnectionLimit = 40;
 
                 /***************************************************************
-                * 下�设置HttpWebRequest的相关属性
+                * 下é�¢è®¾ç½®HttpWebRequest的相关属æ€
                 * ************************************************************/
                 request = (HttpWebRequest)WebRequest.Create(url);
 
                 request.Method = "GET";
-                
-                //获��务器返回
+
+                //获å�–æœ�务器返å›
                 response = (HttpWebResponse)request.GetResponse();
 
                 //获�HTTP返回数�
@@ -286,45 +332,45 @@ namespace WingCloudServer.Plugin
     }
 
     /// <summary>
-    /// 腾讯云定ä½�å“�应实ä½
+    /// 腾讯云定ä½�å“�应实ä½
     /// </summary>
     class IPServiceGuide
     {
         /// <summary>
         /// 状��;正常为0
         /// </summary>
-        public int status { get; set;}
+        public int status { get; set; }
 
         /// <summary>
         /// �应信�
         /// </summary>
-        public string message { get; set;}
+        public string message { get; set; }
 
         /// <summary>
         /// �应结果
         /// </summary>
-        public IPServiceResult result { get; set;}
+        public IPServiceResult result { get; set; }
     }
 
     /// <summary>
-    /// 腾讯云定��应结果
+    /// 腾讯云定ä½�å“�应结æž
     /// </summary>
     class IPServiceResult
     {
         /// <summary>
         /// ip地�
         /// </summary>
-        public string ip { get; set;}
+        public string ip { get; set; }
 
         /// <summary>
-        /// �纬度信�
+        /// ç»�纬度信æ�
         /// </summary>
-        public IPServiceLocationResult location { get; set;}
+        public IPServiceLocationResult location { get; set; }
 
         /// <summary>
         /// 地区信�
         /// </summary>
-        public IPServiceNationResult ad_info { get; set;}
+        public IPServiceNationResult ad_info { get; set; }
     }
 
     /// <summary>
@@ -335,43 +381,43 @@ namespace WingCloudServer.Plugin
         /// <summary>
         /// 纬度
         /// </summary>
-        public double lat { get; set;}
+        public double lat { get; set; }
 
         /// <summary>
         /// �度
         /// </summary>
-        public double lng { get; set;}
+        public double lng { get; set; }
     }
 
     /// <summary>
-    /// 腾讯云定�地区信�
+    /// 腾讯云定ä½�地区信æ�
     /// </summary>
     class IPServiceNationResult
     {
         /// <summary>
         /// 国家
         /// </summary>
-        public string nation { get; set;}
+        public string nation { get; set; }
 
         /// <summary>
         /// �份
         /// </summary>
-        public string province { get; set;}
+        public string province { get; set; }
 
         /// <summary>
         /// 城市
         /// </summary>
-        public string city { get; set;}
+        public string city { get; set; }
 
         /// <summary>
         /// 
         /// </summary>
-        public string district { get; set;}
+        public string district { get; set; }
 
         /// <summary>
         /// ç¼–ç �
         /// </summary>
-        public string adcode { get; set;}
+        public string adcode { get; set; }
     }
 
     /// <summary>
@@ -380,8 +426,8 @@ namespace WingCloudServer.Plugin
     class ServerInfoExtend : ServerInfoDTO
     {
         /// <summary>
-        /// 最短�离
+        /// 最短è·�ç¦
         /// </summary>
-        public double BeelineDistance { get; set;}
+        public double BeelineDistance { get; set; }
     }
 }

+ 43 - 1
src/Plugin/TokenVerifyPluginService.cs

@@ -26,11 +26,53 @@ namespace WingCloudServer.Plugin
             _authenticationService = GetProxy<IAuthenticationService>();
         }
 
+        /// <summary>
+        /// 不需要token验证的接口列表
+        /// </summary>
+        /// <value></value>
+        public static List<string> NotValidationRequiredList = new List<string>
+        {
+            "IConnectService/ConnectAsync",
+            "IEmailService/SendEmailAsync",
+            "ILoginService/CommonLoginAsync",
+            "ILoginService/CheckLoginTypeAsync",
+            "ILoginService/CommonSignUpAsync",
+            "ILoginService/CheckSMSVerificationCodeAsync",
+            "ILoginService/SendSMSVerificationCodeAsync",
+            "ILoginService/SendEmailVerificationCodeAsync",
+            "ILoginService/CheckEmailVerificationCodeAsync",
+            "ILoginService/RetrievePasswordByPhoneAsync",
+            "ILoginService/RetrievePasswordByEmailAsync",
+            "ILoginService/VerifyAccountAsync",
+            "IManagementService/AdminLogin",
+            "IManagementService/FindReportPreviewUrlAsync",
+            "IManagementService/FindReportShareConentAsync",
+            "IManagementService/FindRelatedDeviceCodesAsync",
+            "IManagementService/AddReportTemplateAsync",
+            "IManagementService/UpdateReportTemplateAsync",
+            "IManagementService/RemoveReportTemplateAsync",
+            "IManagementService/GetReportTemplateAsync",           
+            "IRemedicalService/GetReportElementByLanguageAsync",
+            "IRemedicalService/PushFinshExamNotificationToClientAsync",
+            "INotificationService/SendMessageAsync",
+            "INotificationService/PostMessageAsync",
+            "IRegionService/GetRegionsAsync",
+            "IReportService/FindShareContentAsync",
+            "ISMSService/SendMessageAsync",
+            "ISMSService/CheckVerificationCodeAsync",
+            "ISMSService/GeneralMessageAsync",
+            "IStorageService/UploadFileAsync",
+            "IVinnoServerService/UpdateServerInfoAsync",
+            "IVinnoServerService/GetServerInfoListAsync",
+            "IVinnoServerService/EchoAsync"
+        };
+
         public PluginProcessResult PreProcess(IJsonRpcHttpContext context, byte[] requestData)
         {
             var dataLength = (int)context.GetRequestContentLength();
             var requests = JsonRpcCodec.DecodeRequestsAsync(requestData, new System.Threading.CancellationToken(), dataLength).Result;
-            if (context.GetRequestPath() == "/IUserService" && requests[0].Method == "GetUserInfoAsync")
+            var apiName = $"{context.GetRequestPath().Trim('/')}/{requests[0].Method.Trim('/')}";
+            if (context.GetRequestPath() != "/IAuthenticationService" && !NotValidationRequiredList.Contains(apiName))
             {
                 var tokenRequest = JsonConvert.DeserializeObject<List<ValidateTokenRequest>>(requests[0].Params.Value.ToString().Replace("\r", "").Replace("\n", "").Replace("\t", ""));
                 var result = _authenticationService.ValidateTokenAsync(tokenRequest[0]).Result;

+ 4 - 4
src/Resource/Diagnosis/ReportLanguage/en-US.json

@@ -10518,7 +10518,7 @@
   },
   {
 	"Key": "LiverDescription-FattyLiver",
-	"Content": "肝脏大小形态正常,包膜光整,实质回声密集增强",
+	"Content": "肝脏大小形态正常,包膜光整,实质回声密集增强",
 	"State": 1
   },
   {
@@ -10528,7 +10528,7 @@
   },
   {
 	"Key": "LiverDescription-Cirrhosis",
-	"Content": "肝脏体积缩小,形态尚正常,包膜不光整呈锯齿状,实质回声增粗、增强,分布不均匀",
+	"Content": "肝脏体积缩小,形态尚正常,包膜不光整呈锯齿状,实质回声增粗、增强,分布不均匀",
 	"State": 1
   },
   {
@@ -10538,7 +10538,7 @@
   },
   {
 	"Key": "LiverDescription-DiffuseLesions",
-	"Content": "肝脏大小形态尚正常,包膜欠光整,实质回声略增粗、增强,分布欠均匀",
+	"Content": "肝脏大小形态尚正常,包膜欠光整,实质回声略增粗、增强,分布欠均匀",
 	"State": 1
   },
   {
@@ -10548,7 +10548,7 @@
   },
   {
 	"Key": "LiverDescription-PCLD",
-	"Content": "肝脏形态尚正常,体积增大,内见弥漫分布大小不等类圆形囊性回声,边界清楚",
+	"Content": "肝脏形态尚正常,体积增大,内见弥漫分布大小不等类圆形囊性回声,边界清楚",
 	"State": 1
   },
   {

+ 4 - 4
src/Resource/Diagnosis/ReportLanguage/zh-CN.json

@@ -10629,7 +10629,7 @@
   },
   {
 	"Key": "LiverDescription-FattyLiver",
-	"Content": "肝脏大小形态正常,包膜光整,实质回声密集增强",
+	"Content": "肝脏大小形态正常,包膜光整,实质回声密集增强",
 	"State": 1
   },
   {
@@ -10639,7 +10639,7 @@
   },
   {
 	"Key": "LiverDescription-Cirrhosis",
-	"Content": "肝脏体积缩小,形态尚正常,包膜不光整呈锯齿状,实质回声增粗、增强,分布不均匀",
+	"Content": "肝脏体积缩小,形态尚正常,包膜不光整呈锯齿状,实质回声增粗、增强,分布不均匀",
 	"State": 1
   },
   {
@@ -10649,7 +10649,7 @@
   },
   {
 	"Key": "LiverDescription-DiffuseLesions",
-	"Content": "肝脏大小形态尚正常,包膜欠光整,实质回声略增粗、增强,分布欠均匀",
+	"Content": "肝脏大小形态尚正常,包膜欠光整,实质回声略增粗、增强,分布欠均匀",
 	"State": 1
   },
   {
@@ -10659,7 +10659,7 @@
   },
   {
 	"Key": "LiverDescription-PCLD",
-	"Content": "肝脏形态尚正常,体积增大,内见弥漫分布大小不等类圆形囊性回声,边界清楚",
+	"Content": "肝脏形态尚正常,体积增大,内见弥漫分布大小不等类圆形囊性回声,边界清楚",
 	"State": 1
   },
   {

+ 8 - 5
src/WingServer.cs

@@ -41,15 +41,14 @@ namespace WingCloudServer
             _rpcHttpServer.UseEngine(jsonRpcHttpServerEngine);
         }
 
-       
+
 
         private TokenVerifyPlugin tokenVerifyPlugin;
         private IPAddressPlugin ipAddressPlugin;
+        private ServerListPlugin serverListPlugin;
+
 
-    
-        
 
- 
 
         /// <summary>
         /// Start server to load all service
@@ -60,6 +59,7 @@ namespace WingCloudServer
             //按注册顺序执行
             jsonRpcHttpServerEngine.RegisterPlugin(tokenVerifyPlugin);
             jsonRpcHttpServerEngine.RegisterPlugin(ipAddressPlugin);
+            jsonRpcHttpServerEngine.RegisterPlugin(serverListPlugin);
             _rpcInProcessServer.Start();
             _rpcHttpServer.Start();
         }
@@ -192,7 +192,10 @@ namespace WingCloudServer
             ipAddressPlugin = new IPAddressPlugin();
             _rpcHttpServer.RegisterService(typeof(IIPAddressPlugin), ipAddressPlugin);
             ipAddressPlugin.Load(rpcClientPool);
- 
+            serverListPlugin = new ServerListPlugin();
+            _rpcHttpServer.RegisterService(typeof(IServerListPlugin), serverListPlugin);
+            serverListPlugin.Load(rpcClientPool);
+
         }
 
         private Type LoadService(string folder, object serviceName)

+ 2 - 1
src/appsettings.json

@@ -76,7 +76,8 @@
       "Apps": "mongod.bat,sms.bat,"
   },
   "FastServer": {
-    "ServerHost": "http://127.0.0.1:9304/"
+    "IpLocationServiceUrl":"https://apis.map.qq.com/ws/location/v1/ip?ip={0}&key=4Z3BZ-L5RK6-MJ5SC-EXNFA-3V7PH-RSB3U",
+    "IsUsePositionService": true
   },
   "Email": {
     "EmailUserName": "vcloud@vinno.com",