import request from '@/utils/request'
// 分页查询
export const pageList = (query) => {
  return request({
    url: '/thirdapi/xieche/product/list',
    method: 'post',
    data: query
  })
}

/** 系统-携程-ota-(排期推送)  */
export const pushById = (data) => {
    return request({
        url: '/thirdapi/xieche/product/push',
        method: 'post',
        data: data
    })
}

/** 系统-携程(商品上下架)  */
export const updateById = (data) => {
  return request({
      url: '/thirdapi/xieche/product/update',
      method: 'post',
      data: data
  })
}

/** 系统-携程(商品批量更新库存)  */
export const stockUpdateById = (data) => {
  return request({
      url: '/thirdapi/meituan/product/update',
      method: 'post',
      data: data
  })
}



/** 系统-携程-ota(已推送商品sku查看)  */
export const getPushListApi = (params) => {
  return request({
      url: '/thirdapi/xieche/product/list/push',
      method: 'get',
      params: params
  })
}


/** 系统-携程-ota(日历价格-获取)  */
export const getCalendarPriceApi = (data) => {
  return request({
      url: '/thirdapi/xieche/product/calendar/get',
      method: 'post',
      data: data
  })
}

/** 系统-携程-ota(日历价格-更新)  */
export const setCalendarPriceApi = (data) => {
  return request({
      url: '/thirdapi/xieche/product/calendar',
      method: 'post',
      data: data
  })
}

/** 系统-携程-ota(日历价格-删除)  */
export const deleteCalendarPriceApi = (data) => {
  return request({
      url: '/thirdapi/xieche/product/calendar/delete',
      method: 'delete',
      data
  })
}