import request from '@/utils/request'

// 查询市场监管领域信用等级列表
export function listRating(query) {
    return request({
        url: '/crmMarketRegulatoryCreditRating/findByPage',
        method: 'get',
        params: query
    })
}

// 查询市场监管领域信用等级详细
export function getRating(id) {
    return request({
        url: '/crmMarketRegulatoryCreditRating/' + id,
        method: 'get'
    })
}

// 新增市场监管领域信用等级
export function addRating(data) {
    return request({
        url: '/crmMarketRegulatoryCreditRating',
        method: 'post',
        data: data
    })
}

// 修改市场监管领域信用等级
export function updateRating(data) {
    return request({
        url: '/crmMarketRegulatoryCreditRating',
        method: 'put',
        data: data
    })
}

// 删除市场监管领域信用等级
export function delRating(id) {
    return request({
        url: '/crmMarketRegulatoryCreditRating/deleteAll',
        method: 'delete'
    })
}
// 批量删除行政许可
export function delRatingBatch(ids) {
    console.log(ids);
    return request.post('/crmMarketRegulatoryCreditRating/delete',ids)
}