public ResultJson <GetRestaurantListResponse, GetRecipeListByGPSResponse, GetArticleListResponse, GetOrderListResponse> TitlePage(GetTitlePageRequest request)
        {
            ResultJson <GetRestaurantListResponse, GetRecipeListByGPSResponse, GetArticleListResponse, GetOrderListResponse> result = new ResultJson <GetRestaurantListResponse, GetRecipeListByGPSResponse, GetArticleListResponse, GetOrderListResponse>();
            var user = CacheForModelUser.Instance.GetUserInfo(request.UserId);
            GetRestaurantListRequest Restaurant_List_Request = new GetRestaurantListRequest
            {
                CoordX = request.CoordX,
                CoordY = request.CoordY,
                PageNo = 1,
            };
            var result_Restaurant = GetRestaurantListInfo(Restaurant_List_Request);
            GetRecipeListByGPSRequest Recipe_List_Request = new GetRecipeListByGPSRequest
            {
                CoordX = request.CoordX,
                CoordY = request.CoordY,
                PageNo = 1,
                UserId = request.UserId
            };
            RecipeController recipeContro = new RecipeController();
            var result_Recipe             = recipeContro.RecipeListByGPS(Recipe_List_Request);
            GetInfoByIdPaggingRequest Article_List_Request = new GetInfoByIdPaggingRequest
            {
                PageNo = 1,
                Id     = request.UserId,
                Token  = request.Token
            };
            ArticleController ArticleContro = new ArticleController();
            var result_Article = ArticleContro.GetArticleListInfo(Article_List_Request);
            GetInfoByUserIdPageRequest Order_List_Request = new GetInfoByUserIdPageRequest
            {
                PageNo = 1,
                UserId = request.UserId,
                Token  = request.Token
            };
            var result_Order = OrdersBiz.Instance.OrderList(Order_List_Request);

            if (result_Recipe.HttpCode == 200 && result_Restaurant.HttpCode == 200 && result_Article.HttpCode == 200)
            {
                result.HttpCode  = 200;
                result.ListData  = Paging.Instance.PageData(result_Restaurant.ListData, 9, 1);
                result.ListData2 = Paging.Instance.PageData(result_Recipe.ListData, 5, 1);
                result.ListData3 = Paging.Instance.PageData(result_Article.ListData, 4, 1);
                result.ListData4 = Paging.Instance.PageData(result_Order.ListData, 3, 1);
            }
            else
            {
                result.HttpCode = 500;
                result.Message  = "数据筛选失败";
            }
            return(result);
        }
Esempio n. 2
0
 public ResultJson <GetArticleListResponse, GetUserSuitResponse> GetArticleListInfo(GetInfoByIdPaggingRequest request)
 {
     return(ArticleBiz.Instance.SearchArticleList(request.Id, request.PageNo));
 }