Ejemplo n.º 1
0
        /// <summary>
        /// 获取国际,国内,省内热门行程
        /// </summary>
        /// <param name="request">The request.</param>
        /// <returns>Task&lt;Response&lt;GetStrokeHotResponse&gt;&gt;.</returns>
        /// <exception cref="NotImplementedException"></exception>
        public async Task <Response <GetStrokeHotResponse[]> > GetStrokeHot(GetStrokeHotRequest request)
        {
            var strokeInfo = await this.strokeContext.Strokes.WhereIf(request.CategoryType > 0, x => x.CategoryId == request.CategoryType)
                             .Where(x => x.IsRecommend)
                             .Select(x => new GetStrokeHotResponse
            {
                Id           = x.Id,
                Title        = x.Title,
                City         = x.City,
                Destination  = x.Destination,
                ImageUrl     = x.ImageUrl,
                ImageThumb   = x.ImageThumb,
                Price        = x.Price,
                SpecialPrice = x.SpecialPrice
            }).ToArrayAsync();

            return(new Response <GetStrokeHotResponse[]>
            {
                Data = strokeInfo
            });
        }
Ejemplo n.º 2
0
 public Task <Response <GetStrokeHotResponse[]> > GetStrokeHot([FromBody] GetStrokeHotRequest request)
 {
     return(this.strokeService.GetStrokeHot(request));
 }