/**
 * 日志管理接口
 */
import request from '../index'
const prefix = 'sys'
// 操作日志查询
export function getBizLogList(params: object) {
  return request({
    url: `${prefix}/log/biz/list`,
    method: 'get',
    params,
  })
}
// 操作日志详情
export function getBizLogDetail(id: string) {
  return request({
    url: `${prefix}/log/biz/detail/${id}`,
    method: 'get',
  })
}
// 异常日志查询
export function getErrorLogList(params: object) {
  return request({
    url: `${prefix}/log/error/list`,
    method: 'get',
    params,
  })
}
// 异常日志详情
export function getErrorLogDetail(id: string) {
  return request({
    url: `${prefix}/log/error/detail/${id}`,
    method: 'get',
  })
}
// 日志类型查询
export function getLogType() {
  return request({
    url: `${prefix}/dict/code/logType`,
    method: 'get',
  })
}

// 删除业务日志
export function delLog() {
  return request({
    url: `${prefix}/log/biz/delLog`,
    method: 'post',
  })
}

// 删除异常日志
export function delErrorLog() {
  return request({
    url: `${prefix}/log/error/delLog`,
    method: 'post',
  })
}

// 登录日志查询
export function getLoginLogList(params: object) {
  return request({
    url: `${prefix}/loginLog/list`,
    method: 'get',
    params,
  })
}
// 删除日志
export function delLoginLog() {
  return request({
    url: `${prefix}/loginLog/delLoginLog`,
    method: 'post',
  })
}
