/// <summary> /// 查询RabbitMQ配置信息列表 /// </summary> public async Task <QueryRabbitMqRoutingKeyInfoResponse> QueryRabbitMqRoutingKeyInfoAsync([FromBody] QueryRabbitMqRoutingKeyInfoRequest request) { QueryRabbitMqRoutingKeyInfoResponse response = new QueryRabbitMqRoutingKeyInfoResponse(); var rabbitMQRegisterInfos = _context.RabbitMqRegisterInfo.GroupBy(a => a.RoutingKey).OrderByDescending(a => 1).Skip((request.PageIndex - 1) * request.PageSize); foreach (var item in rabbitMQRegisterInfos) { response.RabbitMQRegisterInfos.Add(new RabbitMQRegisterInfoEntity { RoutingKey = item.Key, ApiUrlList = item.Select(a => a.ApiUrl).ToList() }); } return(response); }
public async Task <QueryRabbitMqRoutingKeyInfoResponse> QueryRabbitMqRoutingKeyInfoAsync(QueryRabbitMqRoutingKeyInfoRequest request) { string url = $"{configuration["ServiceAddress:Service.Monitor"]}{configuration["MehtodName:Monitor.QueryRabbitMq.QueryRabbitMqRoutingKeyInfoAsync"]}"; return(await apiHelperService.PostAsync <QueryRabbitMqRoutingKeyInfoResponse>(url, request)); }