|
@@ -159,7 +159,14 @@ namespace WingCloudServer.InteractionCenter
|
|
|
public async Task<bool> UpdateServerInfoToCacheAsync(UpdateServerInfoRequest request)
|
|
|
{
|
|
|
//这里应该是批量移除,请求参数要改
|
|
|
- _fastestServerManager.Remove(request.Code);
|
|
|
+ if (request.Codes != null && request.Codes.Any())
|
|
|
+ {
|
|
|
+ foreach (var code in request.Codes)
|
|
|
+ {
|
|
|
+ _fastestServerManager.Remove(code);
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+ }
|
|
|
return false;
|
|
|
}
|
|
|
|
|
@@ -172,7 +179,15 @@ namespace WingCloudServer.InteractionCenter
|
|
|
{
|
|
|
//这里应该是批量查询,请求参数要改
|
|
|
var list = new List<ServerInfoDTO>();
|
|
|
- IList<ServerInformation> serverInformationList = _fastestServerManager.GetServerInfos(request.Code);
|
|
|
+ IList<ServerInformation> serverInformationList = new List<ServerInformation>();
|
|
|
+ if (request.Codes != null && request.Codes.Any())
|
|
|
+ {
|
|
|
+ serverInformationList = _fastestServerManager.GetServerInfosByCodes(request.Codes);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ serverInformationList = _fastestServerManager.GetAllServerInfos();
|
|
|
+ }
|
|
|
if (serverInformationList != null && serverInformationList.Any())
|
|
|
{
|
|
|
list = serverInformationList.Select(c => new ServerInfoDTO() {
|