import request from '@/utils/request'

// 查询调度日志列表
export function listJobLog(query) {
  return request({
    url: '/monitor/jobLog/list',
    method: 'get',
    params: query
  })
}

// 删除调度日志（支持 tenantId 参数，切换对应租户库执行删除）
export function delJobLog(jobLogIds, tenantId) {
  return request({
    url: '/monitor/jobLog/' + jobLogIds,
    method: 'delete',
    params: tenantId ? { tenantId } : {}
  })
}

// 清空调度日志（支持 tenantId，仅清空指定租户的日志）
export function cleanJobLog(tenantId) {
  return request({
    url: '/monitor/jobLog/clean',
    method: 'delete',
    params: tenantId ? { tenantId } : {}
  })
}

// 导出调度日志
export function exportJobLog(query) {
  return request({
    url: '/monitor/jobLog/export',
    method: 'get',
    params: query
  })
}