import request from '@/utils/request'

// 查询企业认证申请列表
export function listCompanyApply(query) {
  return request({
    url: '/tester/CompanyApply/list',
    method: 'get',
    params: query
  })
}

// 查询未审核测试者认证申请列表
export function unaudit(query) {
  return request({
    url: '/tester/CompanyApply/unaudit',
    method: 'get',
    params: query
  })
}

// 查询企业认证申请详细
export function getCompanyApply(applyId) {
  return request({
    url: '/tester/CompanyApply/' + applyId,
    method: 'get'
  })
}

// 通过用户ID查询企业认证申请详细
export function getCompanyApplyByUid(userID) {
  return request({
    url: '/tester/CompanyApply/uid/' + userID,
    method: 'get'
  })
}

// 新增企业认证申请
export function addCompanyApply(data) {
  return request({
    url: '/tester/CompanyApply',
    method: 'post',
    data: data
  })
}

// 修改企业认证申请
export function updateCompanyApply(data) {
  return request({
    url: '/tester/CompanyApply',
    method: 'put',
    data: data
  })
}

// 更改企业认证申请审核状态
export function changeCAStatus(data) {
  return request({
    url: '/tester/CompanyApply/changeApprovalStatus',
    method: 'put',
    data: data
  })
}

// 删除企业认证申请
export function delCompanyApply(applyId) {
  return request({
    url: '/tester/CompanyApply/' + applyId,
    method: 'delete'
  })
}

// 导出企业认证申请
export function exportCompanyApply(query) {
  return request({
    url: '/tester/CompanyApply/export',
    method: 'get',
    params: query
  })
}