import request from '@/utils/request'

// 查询拍单商品订单列表
export function listFsCourseProductOrder(query) {
  return request({
    url: '/course/fsCourseProductOrder/list',
    method: 'get',
    params: query
  })
}

// 查询拍单商品订单详细
export function getFsCourseProductOrder(courseOrderId) {
  return request({
    url: '/course/fsCourseProductOrder/' + courseOrderId,
    method: 'get'
  })
}

// 新增拍单商品订单
export function addFsCourseProductOrder(data) {
  return request({
    url: '/course/fsCourseProductOrder',
    method: 'post',
    data: data
  })
}

// 修改拍单商品订单
export function updateFsCourseProductOrder(data) {
  return request({
    url: '/course/fsCourseProductOrder',
    method: 'put',
    data: data
  })
}

// 删除拍单商品订单
export function delFsCourseProductOrder(courseOrderId) {
  return request({
    url: '/course/fsCourseProductOrder/' + courseOrderId,
    method: 'delete'
  })
}

// 导出拍单商品订单
export function exportFsCourseProductOrder(query) {
  return request({
    url: '/course/fsCourseProductOrder/export',
    method: 'get',
    params: query
  })
}
// 导出拍单商品订单(解密手机号)
export function exportFsCourseProductOrderDecodePhone(query) {
  return request({
    url: '/course/fsCourseProductOrder/decodeExport',
    method: 'get',
    params: query
  })
}


// 退款拍商品订单
export function refund(data) {
  return request({
    url: '/course/fsCourseProductOrder/refund',
    method: 'post',
    data: data
  })
}

// 查询收货人电话
export function getOrderUserPhone(courseOrderId) {
  return request({
    url: '/course/fsCourseProductOrder/queryPhone/' + courseOrderId,
    method: 'get'
  })
}
