import request from '@/config/axios'

export interface BlacklistVO {
  id: number
  memberId: number
  remark: string
}

// 查询黑名单列表
export const getBlacklistPage = async (params) => {
  return await request.get({ url: `/message/blacklist/page`, params })
}

// 查询黑名单详情
export const getBlacklist = async (id: number) => {
  return await request.get({ url: `/message/blacklist/get?id=` + id })
}

// 新增黑名单
export const createBlacklist = async (data: BlacklistVO) => {
  return await request.post({ url: `/message/blacklist/create`, data })
}

// 修改黑名单
export const updateBlacklist = async (data: BlacklistVO) => {
  return await request.put({ url: `/message/blacklist/update`, data })
}

// 删除黑名单
export const deleteBlacklist = async (id: number) => {
  return await request.delete({ url: `/message/blacklist/delete?id=` + id })
}

// 导出黑名单 Excel
export const exportBlacklist = async (params) => {
  return await request.download({ url: `/message/blacklist/export-excel`, params })
}
