eight
2024-10-25 3d10cfa8882afcfa28a7623b45232aef54fe033d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
package cn.lihu.jh.module.infra.service.job;
 
import cn.lihu.jh.framework.common.pojo.PageResult;
import cn.lihu.jh.module.infra.controller.admin.job.vo.job.JobPageReqVO;
import cn.lihu.jh.module.infra.controller.admin.job.vo.job.JobSaveReqVO;
import cn.lihu.jh.module.infra.dal.dataobject.job.JobDO;
import org.quartz.SchedulerException;
 
import javax.validation.Valid;
 
/**
 * 定时任务 Service 接口
 *
 * @author 芋道源码
 */
public interface JobService {
 
    /**
     * 创建定时任务
     *
     * @param createReqVO 创建信息
     * @return 编号
     */
    Long createJob(@Valid JobSaveReqVO createReqVO) throws SchedulerException;
 
    /**
     * 更新定时任务
     *
     * @param updateReqVO 更新信息
     */
    void updateJob(@Valid JobSaveReqVO updateReqVO) throws SchedulerException;
 
    /**
     * 更新定时任务的状态
     *
     * @param id 任务编号
     * @param status 状态
     */
    void updateJobStatus(Long id, Integer status) throws SchedulerException;
 
    /**
     * 触发定时任务
     *
     * @param id 任务编号
     */
    void triggerJob(Long id) throws SchedulerException;
 
    /**
     * 同步定时任务
     *
     * 目的:自己存储的 Job 信息,强制同步到 Quartz 中
     */
    void syncJob() throws SchedulerException;
 
    /**
     * 删除定时任务
     *
     * @param id 编号
     */
    void deleteJob(Long id) throws SchedulerException;
 
    /**
     * 获得定时任务
     *
     * @param id 编号
     * @return 定时任务
     */
    JobDO getJob(Long id);
 
    /**
     * 获得定时任务分页
     *
     * @param pageReqVO 分页查询
     * @return 定时任务分页
     */
    PageResult<JobDO> getJobPage(JobPageReqVO pageReqVO);
 
}