import request from '@/utils/request'

// 查询企业征信机构评分（天眼查）列表
export function listRating(query) {
    return request({
        url: '/crmEnterpriseCreditRating/findByPage',
        method: 'get',
        params: query
    })
}

// 查询企业征信机构评分（天眼查）详细
export function getRating(id) {
    return request({
        url: '/crmEnterpriseCreditRating/' + id,
        method: 'get'
    })
}

// 新增企业征信机构评分（天眼查）
export function addRating(data) {
    return request({
        url: '/crmEnterpriseCreditRating',
        method: 'post',
        data: data
    })
}

// 修改企业征信机构评分（天眼查）
export function updateRating(data) {
    return request({
        url: '/crmEnterpriseCreditRating',
        method: 'put',
        data: data
    })
}

// 删除企业征信机构评分（天眼查）
export function delRating(id) {
    return request({
        url: '/crmEnterpriseCreditRating/deleteAll',
        method: 'delete'
    })
}
// 批量删除行政许可
export function delRatingBatch(ids) {
    console.log(ids);
    return request.post('/crmEnterpriseCreditRating/delete',ids)
}