import request from '@/utils/request'

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

// 查询海关信用等级信息详细
export function getRating(id) {
  return request({
    url: '/basicData/rating/' + id,
    method: 'get'
  })
}

// 新增海关信用等级信息
export function addRating(data) {
  return request({
    url: '/basicData/rating',
    method: 'post',
    data: data
  })
}

// 修改海关信用等级信息
export function updateRating(data) {
  return request({
    url: '/basicData/rating',
    method: 'put',
    data: data
  })
}

// 删除海关信用等级信息
export function delRating(id) {
  return request({
    url: '/crmCustomsCreditRating/deleteAll' ,
    method: 'delete'
  })
}

// 批量删除海关信用等级信息
export function delRatingBatch(ids) {
  console.log(ids);
  return request.post('/crmCustomsCreditRating/delete',ids)
}

