import request from '@/utils/request'

// 查询域名管路列表
export function listCompanyDomain(query) {
  return request({
    url: '/company/companyDomain/list',
    method: 'get',
    params: query
  })
}

// 查询域名管路详细
export function getCompanyDomain(id) {
  return request({
    url: '/company/companyDomain/' + id,
    method: 'get'
  })
}

// 新增域名管路
export function addCompanyDomain(data) {
  return request({
    url: '/company/companyDomain',
    method: 'post',
    data: data
  })
}

// 修改域名管路
export function updateCompanyDomain(data) {
  return request({
    url: '/company/companyDomain',
    method: 'put',
    data: data
  })
}

// 删除域名管路
export function delCompanyDomain(id) {
  return request({
    url: '/company/companyDomain/' + id,
    method: 'delete'
  })
}

// 导出域名管路
export function exportCompanyDomain(query) {
  return request({
    url: '/company/companyDomain/export',
    method: 'get',
    params: query
  })
}

export function domainBatchBinding(data){
  return request({
    url: '/company/companyDomain/domainBatchBinding',
    method: 'post',
    data: data
  })
}

export function exportTemplate(){
  return request({
    url: '/company/companyDomain/exportTemplate',
    method: 'get',
  })
}
