import service from '@/utils/request'

// 新增黑白名单
export const addShortlist = (data) => {
  return service({
    url: '/shortlist/createShortlist',
    method: 'post',
    data
  })
}

// 修改黑白名单
export const updateShortlist = (data) => {
  return service({
    url: '/shortlist/updateShortlist',
    method: 'put',
    data
  })
}

// 查询所有黑白名单
export const queryAllShortlists = () => {
  return service({
    url: '/shortlist/queryAllShortlists',
    method: 'get'
  })
}

// 查询黑白名单
export const queryShortlistList = (data) => {
  return service({
    url: '/shortlist/queryShortlistList',
    method: 'post',
    data
  })
}

// 删除黑白名单
export const deleteShortlist = (id) => {
  return service({
    url: '/shortlist/deleteShortlist?id=' + id,
    method: 'delete'
  })
}
