修改定时任务关键词

This commit is contained in:
TinyAnts
2023-01-17 11:09:52 +08:00
parent a8559f0d70
commit 70fb9d4b9b
4 changed files with 6 additions and 6 deletions

View File

@@ -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();
// 构建任务

View File

@@ -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()));
}
}