import { HttpResponse } from '../@types'
import request from './request'
import requestJava from './requestJava'




class HotelService {
  //兑换优惠券
  static async updateUseCouponBycod(param:any): Promise<HttpResponse> {
    return requestJava('/api/b2b/user/updateUseCouponBycod', param)
  }
  //获取优惠券
  static async getUserCanUseCouponList(param:any): Promise<HttpResponse> {
    return requestJava('/api/b2b/user/getUserCanUseCouponList', param)
  }
  //散客订单详情
  static async GetJAPANOrderDetail(param:any): Promise<HttpResponse> {
    return request('dmc_post_Get_GetJAPAN_OrderDetail', param)
  }
  //散客取消订单
  static async GetJAPANReservationCancallation(param:any): Promise<HttpResponse> {
    return request('dmc_post_Get_GetJAPAN_GetJAPAN_ReservationCancallation', param)
  }
  //散客订单列表
  static async GetB2BJapanHotelOrderList(param:any): Promise<HttpResponse> {
    return request('sellorder_post_GetB2BJapanHotelOrderList', param)
  }
  //散客下单
  static async GetHotelHotelBooking(param:any): Promise<HttpResponse> {
    return request('dmc_post_Get_GetJAPAN_HotelBooking', param)
  }
  //获取相似数据
  static async GetHotelRoomsList(param:any): Promise<HttpResponse> {
    return request('dmc_post_Get_GetJAPAN_RoomsList', param)
  }
  //
  //获取酒店详情
  static async GetHotelDetailScat(param:any): Promise<HttpResponse> {
    return request('dmc_post_Get_GetJAPAN_HotelDetail', param)
  }
  // 获取散客酒店列表
  static async GetJAPANHotelList(param:any):Promise<HttpResponse>{
    param.reviewRatingUpperLimits=param.reviewRatingUpperLimits&&param.reviewRatingUpperLimits!=''?param.reviewRatingUpperLimits:0
    param.reviewRatingLowerLimits=param.reviewRatingLowerLimits&&param.reviewRatingLowerLimits!=''?param.reviewRatingLowerLimits:0
    param.searchMaxRate=param.searchMaxRate&&param.searchMaxRate!=''?param.searchMaxRate:0
    param.searchMinRate=param.searchMinRate&&param.searchMinRate!=''?param.searchMinRate:0
    return request('dmc_post_Get_GetJAPAN_HotelList',param)
  }
}

export default HotelService
