From 2307f1cf7f1dbb4c17abdf8baea692d97b1dba3e Mon Sep 17 00:00:00 2001 From: dengzedong <dengzedong@email> Date: 星期五, 06 十二月 2024 10:35:52 +0800 Subject: [PATCH] job --- src/api/job/index.ts | 37 ++++++++++++------------------------- 1 files changed, 12 insertions(+), 25 deletions(-) diff --git a/src/api/job/index.ts b/src/api/job/index.ts index dee4f0c..b95c18f 100644 --- a/src/api/job/index.ts +++ b/src/api/job/index.ts @@ -1,54 +1,41 @@ 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) => { +export const getScheduleJobPage = (params) => { return request.get({ url: '/shasteel/job/schedule/page', params }) } // 查询ScheduleJob详情 -export const getScheduleJob = (id: number) => { - return request.get({ url: '/shasteel/job/schedule/info?id=' + id}) +export const getScheduleJob = (id) => { + return request.get({ url: '/shasteel/job/schedule/' + id}) } // 新增ScheduleJob -export const createScheduleJob = (data: ScheduleJobVO) => { - return request.post({ url: '/shasteel/job/schedule/create', data }) +export const createScheduleJob = (data) => { + return request.post({ url: '/shasteel/job/schedule', data }) } // 修改ScheduleJob -export const updateScheduleJob = (data: ScheduleJobVO) => { - return request.put({ url: '/shasteel/job/schedule/update', data }) +export const updateScheduleJob = (data) => { + return request.put({ url: '/shasteel/job/schedule', data }) } // 删除ScheduleJob -export const deleteScheduleJob = (id: number) => { - return request.delete({ url: '/shasteel/job/schedule/delete?id=' + id }) +export const deleteScheduleJob = (id) => { + return request.delete({ url: '/shasteel/job/schedule?id=' + id }) } // 立即执行 -export const runScheduleJob = (id: number) => { +export const runScheduleJob = (id) => { return request.put({ url: '/shasteel/job/schedule/run?id=' + id }) } // 暂停 -export const pauseScheduleJob = (id: number) => { +export const pauseScheduleJob = (id) => { return request.put({ url: '/shasteel/job/schedule/pause?id=' + id }) } // 恢复 -export const resumeScheduleJob = (id: number) => { +export const resumeScheduleJob = (id) => { return request.put({ url: '/shasteel/job/schedule/resume?id=' + id }) } -- Gitblit v1.9.3