import request from '@/utils/request'

// 查询订单详情列表
export function listOrderDetail(query) {
  return request({
    method: 'get',
    params: {
      _gp: 'admin.unimall.marketOrderDetail',
      _mt: 'list',
      ...query
    }
  })
}

// 查询订单详情详细
export function getOrderDetail(id) {
  return request({
    method: 'get',
    params: {
      _gp: 'admin.unimall.marketOrderDetail',
      _mt: 'get',
      id: id
    }
  })
}

// 新增订单详情
export function addOrderDetail(data) {
  return request({
    method: 'post',
    params: {
      _gp: 'admin.unimall.marketOrderDetail',
      _mt: 'add',
      marketOrderDetail: data
    }
  })
}

// 修改订单详情
export function updateOrderDetail(data) {
  return request({
    method: 'post',
    params: {
      _gp: 'admin.unimall.marketOrderDetail',
      _mt: 'update',
      marketOrderDetail: data
    }
  })
}

// 删除订单详情
export function delOrderDetail(id) {
  return request({
    method: 'post',
    params: {
      _gp: 'admin.unimall.marketOrderDetail',
      _mt: 'delete',
      id: id
    }
  })
}

// 导出订单详情
export function exportOrderDetail(query) {
  return request({
    method: 'get',
    params: {
      _gp: 'admin.unimall.marketOrderDetail',
      _mt: 'export',
      ...query
    }
  })
}
