/// <summary> /// 查询艺龙酒店列表 /// </summary> /// <param name="query"></param> /// <returns></returns> public QueryHotelInfoResponseModel QueryHotelList(QueryHotelInfoRequestModel query) { HotelListRequestEntity requestElong = Mapper.Map <QueryHotelInfoRequestModel, HotelListRequestEntity>(query); string responseElong = _hotelListService.QueryStr(requestElong); BaseHotelResponseModel <QueryHotelInfoResponseModel> responseModel = JsonConvert.DeserializeObject <BaseHotelResponseModel <QueryHotelInfoResponseModel> >(responseElong); if (responseModel.Code != "0") { throw new Exception("api异常,请稍后再试"); } return(responseModel.Result); //HotelListResponseEntity responseElong = _hotelListService.Query(requestElong); //return Mapper.Map<HotelListResponseEntity, QueryHotelInfoResponseModel>(responseElong); }
public string QueryStr(HotelListRequestEntity request) { return(HotelApiAccess.Query(request, "hotel.list")); }
public HotelListResponseEntity Query(HotelListRequestEntity request) { return(HotelApiAccess.Query <HotelListRequestEntity, HotelListResponseEntity>(request, "hotel.list").Result); }