import request from '@/utils/request'

// 查询信用评级机构评级信息列表
export function listAgency(query) {
  return request({
    url: '/basicData/xcrRatingAgency/findByPage',
    method: 'get',
    params: query
  })
}

// 查询信用评级机构评级信息详细
export function getAgency(id) {
  return request({
    url: '/basicData/xcrRatingAgency/' + id,
    method: 'get'
  })
}

// 新增信用评级机构评级信息
export function addAgency(data) {
  return request({
    url: '/basicData/xcrRatingAgency',
    method: 'post',
    data: data
  })
}

// 修改信用评级机构评级信息
export function updateAgency(data) {
  return request({
    url: '/basicData/xcrRatingAgency',
    method: 'put',
    data: data
  })
}

// 删除信用评级机构评级信息
export function delAgency(id) {
  return request({
    url: '/basicData/xcrRatingAgency/deleteAll',
    method: 'delete'
  })
}
// 批量删除行政许可
export function delAgencyBatch(ids) {
  return request.post('/basicData/xcrRatingAgency/delete',ids)
}
