import request from '@/utils/request'

// 查询银行信用等级信息列表
export function listRating(query) {
    return request({
        url: '/crmBankCreditRating/findByPage',
        method: 'get',
        params: query
    })
}

// 查询银行信用等级信息详细
export function getRating(id) {
    return request({
        url: '/crmBankCreditRating/' + id,
        method: 'get'
    })
}

// 新增银行信用等级信息
export function addRating(data) {
    return request({
        url: '/crmBankCreditRating',
        method: 'post',
        data: data
    })
}

// 修改银行信用等级信息
export function updateRating(data) {
    return request({
        url: '/crmBankCreditRating',
        method: 'put',
        data: data
    })
}

// 删除银行信用等级信息
export function delRating(id) {
    return request({
        url: '/crmBankCreditRating/deleteAll',
        method: 'delete'
    })
}
// 批量删除行政许可
export function delRatingBatch(ids) {
    console.log(ids);
    return request.post('/crmBankCreditRating/delete',ids)
}