import request from '@/utils/request'

// 查询电商订单表列表
export function listOrder(query) {
  return request({
    method: 'get',
    params: {
      _gp: 'admin.shop.shopOrder',
      _mt: 'list',
      ...query
    }
  })
}

// 查询电商订单表详细
export function getOrder(id) {
  return request({
    method: 'get',
    params: {
      _gp: 'admin.shop.shopOrder',
      _mt: 'get',
      id: id
    }
  })
}

// 新增电商订单表
export function addOrder(data) {
  return request({
    method: 'post',
    params: {
      _gp: 'admin.shop.shopOrder',
      _mt: 'add',
      shopOrder: data
    }
  })
}

// 修改电商订单表
export function updateOrder(data) {
  return request({
    method: 'post',
    params: {
      _gp: 'admin.shop.shopOrder',
      _mt: 'update',
      shopOrder: data
    }
  })
}

// 删除电商订单表
export function delOrder(id) {
  return request({
    method: 'post',
    params: {
      _gp: 'admin.shop.shopOrder',
      _mt: 'delete',
      id: id
    }
  })
}

// 导出电商订单表
export function exportOrder(query) {
  return request({
    method: 'get',
    params: {
      _gp: 'admin.shop.shopOrder',
      _mt: 'export',
      ...query
    }
  })
}
