import http from '@/api'
import { LogininforVO, LogininforQuery } from '@/api/interface/monitor/logininfor'
/**
 * @name 查询系统访问记录列表
 * @param query 参数
 * @returns 返回列表
 */
export const listLogininforApi = (query: LogininforQuery) => {
  return http.get<LogininforVO[]>('/monitor/logininfor/list', query, { loading: false })
}

/**
 * @name 删除系统访问记录
 * @param infoId infoId
 * @returns returns
 */
export const delLogininforApi = (infoId: string | number | Array<string | number>) => {
  return http.delete<any>(`/monitor/logininfor/${infoId}`)
}

/**
 * @name 导出数据
 * @returns returns
 */
export const exportLogininforApi = (data: any) => {
  return http.downloadPost('/monitor/logininfor/export', data)
}

/**
 * @name 清空日志
 */
export const cleanLoginInfoApi = () => {
  return http.delete<any>(`/monitor/logininfor/clean`)
}
