import request from '@/utils/request'

// 查询订单记录列表
export function listOrders(query) {
  return request({
    url: '/admin/orders/list',
    method: 'get',
    params: query
  })
}

// 查询订单记录详细
export function getOrders(id) {
  return request({
    url: '/admin/orders/' + id,
    method: 'get'
  })
}

// 新增订单记录
export function addOrders(data) {
  return request({
    url: '/admin/orders',
    method: 'post',
    data: data
  })
}

// 修改订单记录
export function updateOrders(data) {
  return request({
    url: '/admin/orders',
    method: 'put',
    data: data
  })
}

// 删除订单记录
export function delOrders(id) {
  return request({
    url: '/admin/orders/' + id,
    method: 'delete'
  })
}
