import request from '@/utils/request'

// 查询企业微信客户列表
export function listExternalContact(query) {
  return request({
    url: '/qw/externalContact/list',
    method: 'get',
    params: query
  })
}

// 查询企业微信客户详细
export function getExternalContact(id) {
  return request({
    url: '/qw/externalContact/' + id,
    method: 'get'
  })
}

// 新增企业微信客户
export function addExternalContact(data) {
  return request({
    url: '/qw/externalContact',
    method: 'post',
    data: data
  })
}

// 修改企业微信客户
export function updateExternalContact(data) {
  return request({
    url: '/qw/externalContact',
    method: 'put',
    data: data
  })
}

// 删除企业微信客户
export function delExternalContact(id) {
  return request({
    url: '/qw/externalContact/' + id,
    method: 'delete'
  })
}

// 导出企业微信客户
export function exportExternalContact(query) {
  return request({
    url: '/qw/externalContact/export',
    method: 'get',
    params: query
  })
}

// 导出企业微信客户unionId
export function exportUnionId(query) {
  return request({
    url: '/qw/externalContact/exportUnionId',
    method: 'get',
    params: query
  })
}
