import request from '@/utils/request'

// 查询积分消费订单列表
export function listOrder(query) {
  return request({
    url: '/integral/order/list',
    method: 'get',
    params: query
  })
}

// 查询积分消费订单详细
export function getOrder(id) {
  return request({
    url: '/integral/order/' + id,
    method: 'get'
  })
}

// 新增积分消费订单
export function addOrder(data) {
  return request({
    url: '/integral/order',
    method: 'post',
    data: data
  })
}

// 修改积分消费订单
export function updateOrder(data) {
  return request({
    url: '/integral/order',
    method: 'put',
    data: data
  })
}

// 删除积分消费订单
export function delOrder(id) {
  return request({
    url: '/integral/order/' + id,
    method: 'delete'
  })
}

// 导出积分消费订单
export function exportOrder(query) {
  return request({
    url: '/integral/order/export',
    method: 'get',
    params: query
  })
}