import request from '@/utils/request'

// 查询黑名单列表
export function listBlacklist(query) {
  return request({
    url: '/laboratory/blacklist/list',
    method: 'get',
    params: query
  })
}

// 查询黑名单详细
export function getBlacklist(id) {
  return request({
    url: '/laboratory/blacklist/' + id,
    method: 'get'
  })
}

// 新增黑名单
export function addBlacklist(data) {
  return request({
    url: '/laboratory/blacklist',
    method: 'post',
    data: data
  })
}

// 修改黑名单
export function updateBlacklist(data) {
  return request({
    url: '/laboratory/blacklist',
    method: 'put',
    data: data
  })
}

// 删除黑名单
export function delBlacklist(id) {
  return request({
    url: '/laboratory/blacklist/' + id,
    method: 'delete'
  })
}

// 查询历史记录
export function getBlackDetail(query) {
  return request({
    url: '/laboratory/blacklist/getBlackDetail',
    method: 'get',
    params: query
  })
}


// 查询个人黑名单历史记录
export function myBlackDetail(query) {
  return request({
    url: '/laboratory/blacklist/myBlackDetail',
    method: 'get',
    params: query
  })
}

// 移除黑名单
export function removeBlacklist(data) {
  return request({
    url: '/laboratory/blacklist/removeBlacklist',
    method: 'post',
    data: data
  })
}
