public BasePageOutput <object> QueryApiGatewayReRouteList([FromQuery] QueryApiGatewayReRouteListInput input)
        {
            int totalNumber = 0;
            var listResult  = _adminDbContext.Queryable <ApiGatewayReRouteModel>()
                              .WhereIF(input.GatewayId > 0, it => it.GatewayId == input.GatewayId)
                              .WhereIF(input.State > -1, it => it.State == input.State)
                              .ToPageList(input.PageIndex, input.PageSize, ref totalNumber);

            return(new BasePageOutput <object> {
                CurrentPage = input.PageIndex, Total = totalNumber, Data = listResult
            });
        }
Пример #2
0
        /// <summary>
        /// 查询网关路由列表
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public async Task <QueryApiGatewayReRouteListOutput> QueryApiGatewayReRouteList(QueryApiGatewayReRouteListInput input)
        {
            int count      = 0;
            var listResult = await _routeDbRepository.AsQueryable()
                             .WhereIF(input.GatewayId > 0, it => it.GatewayId == input.GatewayId)
                             .WhereIF(input.State > -1, it => it.State == input.State)
                             .ToPageListAsync(input.PageIndex, input.PageSize, count);

            return(new QueryApiGatewayReRouteListOutput {
                CurrentPage = input.PageIndex, Total = listResult.Count, Data = listResult
            });
        }
Пример #3
0
 public async Task <QueryApiGatewayReRouteListOutput> QueryApiGatewayReRouteList([FromQuery] QueryApiGatewayReRouteListInput input)
 {
     return(await _microserviceBusines.QueryApiGatewayReRouteList(input));
 }