import request from '@/config/axios'
|
|
export interface ScheduleJobVO {
|
id: number
|
beanName: string
|
params: string
|
cronExpression: string
|
status: number
|
remark: string
|
}
|
|
export interface ScheduleJobPageReqVO extends PageParam {
|
beanName?: string
|
}
|
|
// 查询ScheduleJob列表
|
export const getScheduleJobPage = (params: ScheduleJobPageReqVO) => {
|
return request.get({ url: '/sms/job/schedule/page', params })
|
}
|
|
// 查询ScheduleJob详情
|
export const getScheduleJob = (id: number) => {
|
return request.get({ url: '/sms/job/schedule/info?id=' + id})
|
}
|
|
// 新增ScheduleJob
|
export const createScheduleJob = (data: ScheduleJobVO) => {
|
return request.post({ url: '/sms/job/schedule/create', data })
|
}
|
|
// 修改ScheduleJob
|
export const updateScheduleJob = (data: ScheduleJobVO) => {
|
return request.put({ url: '/sms/job/schedule/update', data })
|
}
|
|
// 删除ScheduleJob
|
export const deleteScheduleJob = (id: number) => {
|
return request.delete({ url: '/sms/job/schedule/delete?id=' + id })
|
}
|
|
// 立即执行
|
export const runScheduleJob = (id: number) => {
|
return request.put({ url: '/sms/job/schedule/run?id=' + id })
|
}
|
|
// 暂停
|
export const pauseScheduleJob = (id: number) => {
|
return request.put({ url: '/sms/job/schedule/pause?id=' + id })
|
}
|
|
// 恢复
|
export const resumeScheduleJob = (id: number) => {
|
return request.put({ url: '/sms/job/schedule/resume?id=' + id })
|
}
|