fly 2 years ago
parent
commit
cc4260cfdf
1 changed files with 2 additions and 18 deletions
  1. 2 18
      src/InteractionCenter/VinnoServerService.cs

+ 2 - 18
src/InteractionCenter/VinnoServerService.cs

@@ -218,24 +218,8 @@ namespace WingCloudServer.InteractionCenter
         {
             //这里应该是批量查询,请求参数要改
             var list = new List<ServerInfoDTO>();
-            var serverInformationList = new List<CacheDistributedServerInfosDTO>();
-            if (request.Codes != null && request.Codes.Any())
-            {
-                foreach (var item in request.Codes)
-                {
-                    var entity = CacheMaintenance.Instance.Get<IDistributedServerInfosManager>().Get(item);
-                    if (entity != null && !string.IsNullOrEmpty(entity.Code))
-                    {
-                        serverInformationList.Add(entity);
-                    }
-                }
-
-            }
-            else
-            {
-                serverInformationList = CacheMaintenance.Instance.Get<IDistributedServerInfosManager>()
-                .Where(x => !string.IsNullOrEmpty(x.Name) && !string.IsNullOrEmpty(x.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()