修改定时任务关键词
This commit is contained in:
parent
a8559f0d70
commit
70fb9d4b9b
|
|
@ -53,7 +53,7 @@ public class QuartzUtils {
|
|||
*/
|
||||
public static void createScheduleJob(Scheduler scheduler, Crontab job) throws SchedulerException {
|
||||
Integer jobId = job.getId();
|
||||
String jobGroup = job.getGroups();
|
||||
String jobGroup = job.getTypes();
|
||||
String expression = job.getRules();
|
||||
|
||||
// 构建任务
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ public class CrontabServiceImpl implements ICrontabService {
|
|||
public void add(CrontabCreateValidate createValidate) throws SchedulerException {
|
||||
Crontab crontab = new Crontab();
|
||||
crontab.setName(createValidate.getName());
|
||||
crontab.setGroups(createValidate.getGroups());
|
||||
crontab.setTypes(createValidate.getGroups());
|
||||
crontab.setCommand(createValidate.getCommand());
|
||||
crontab.setRules(createValidate.getRules());
|
||||
crontab.setStatus(createValidate.getStatus());
|
||||
|
|
@ -148,7 +148,7 @@ public class CrontabServiceImpl implements ICrontabService {
|
|||
|
||||
crontab.setName(updateValidate.getName());
|
||||
crontab.setCommand(updateValidate.getCommand());
|
||||
crontab.setGroups(updateValidate.getGroups());
|
||||
crontab.setTypes(updateValidate.getGroups());
|
||||
crontab.setRules(updateValidate.getRules());
|
||||
crontab.setStatus(updateValidate.getStatus());
|
||||
crontab.setRemark(updateValidate.getRemark());
|
||||
|
|
@ -181,7 +181,7 @@ public class CrontabServiceImpl implements ICrontabService {
|
|||
crontab.setDeleteTime(System.currentTimeMillis() / 1000);
|
||||
crontabMapper.updateById(crontab);
|
||||
|
||||
scheduler.deleteJob(QuartzUtils.getJobKey(crontab.getId(), crontab.getGroups()));
|
||||
scheduler.deleteJob(QuartzUtils.getJobKey(crontab.getId(), crontab.getTypes()));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ public class Crontab implements Serializable {
|
|||
@TableId(value="id", type= IdType.AUTO)
|
||||
private Integer id; // 主键
|
||||
private String name; // 任务名称
|
||||
private String groups; // 任务分组
|
||||
private String types; // 任务分组
|
||||
private String command; // 执行命令
|
||||
private String rules; // 执行规则
|
||||
private String remark; // 备注信息
|
||||
|
|
|
|||
|
|
@ -503,7 +503,7 @@ DROP TABLE IF EXISTS `la_crontab`;
|
|||
CREATE TABLE `la_crontab` (
|
||||
`id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '主键',
|
||||
`name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '任务名称',
|
||||
`groups` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '任务分组',
|
||||
`types` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '任务分组',
|
||||
`command` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '任务命令',
|
||||
`rules` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '任务贵州',
|
||||
`remark` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '备注信息',
|
||||
|
|
|
|||
Loading…
Reference in New Issue