import request from '@/utils/request'

// 查询订单服务地址列表
export function listAddress(query) {
  return request({
    url: '/system/address/list',
    method: 'get',
    params: query
  })
}

// 查询订单服务地址详细
export function getAddress(orderId) {
  return request({
    url: '/system/address/' + orderId,
    method: 'get'
  })
}

// 新增订单服务地址
export function addAddress(data) {
  return request({
    url: '/system/address',
    method: 'post',
    data: data
  })
}

// 修改订单服务地址
export function updateAddress(data) {
  return request({
    url: '/system/address',
    method: 'put',
    data: data
  })
}

// 删除订单服务地址
export function delAddress(orderId) {
  return request({
    url: '/system/address/' + orderId,
    method: 'delete'
  })
}

// 导出订单服务地址
export function exportAddress(query) {
  return request({
    url: '/system/address/export',
    method: 'get',
    params: query
  })
}
