import request from '@/utils/request'

// 查询行政许可列表
export function listLicense(query) {
  return request({
    url: '/crmAdministrativeLicense/findByPage',
    method: 'get',
    params: query
  })
}

// 查询行政许可详细
export function getLicense(id) {
  return request({
    url: '/basicData/license/' + id,
    method: 'get'
  })
}

// 新增行政许可
export function addLicense(data) {
  return request({
    url: '/basicData/license',
    method: 'post',
    data: data
  })
}

// 修改行政许可
export function updateLicense(data) {
  return request({
    url: '/basicData/license',
    method: 'put',
    data: data
  })
}

// 删除行政许可
export function delLicense(id) {
  return request({
    url: '/crmAdministrativeLicense/deleteAll',
    method: 'delete'
  })
}

// 批量删除行政许可
export function delLicenseBatch(ids) {
  console.log(ids);
  return request.post('/crmAdministrativeLicense/delete',ids)
}
