Files
aiot-uniapp/src/api/infra/job/log/index.ts
2025-12-21 16:47:17 +08:00

32 lines
753 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import type { PageParam, PageResult } from '@/http/types'
import { http } from '@/http/http'
// TODO @AI不用 baseUrl 方式
const baseUrl = '/infra/job-log'
/** 定时任务日志信息 */
export interface JobLog {
id?: number
jobId: number
handlerName: string
handlerParam: string
cronExpression: string
executeIndex: string
beginTime: Date
endTime: Date
duration: string
status: number
createTime?: string
result: string
}
/** 获取定时任务日志分页列表 */
export function getJobLogPage(params: PageParam) {
return http.get<PageResult<JobLog>>(`${baseUrl}/page`, params)
}
/** 获取定时任务日志详情 */
export function getJobLog(id: number) {
return http.get<JobLog>(`${baseUrl}/get?id=${id}`)
}