优化代码

This commit is contained in:
RuoYi
2025-03-14 16:09:01 +08:00
parent 525ebf92d2
commit 51632f8e60
5 changed files with 24 additions and 15 deletions

View File

@ -177,7 +177,7 @@ public class SysJobController extends BaseController
@PreAuthorize("@ss.hasPermi('monitor:job:remove')")
@Log(title = "定时任务", businessType = BusinessType.DELETE)
@DeleteMapping("/{jobIds}")
public AjaxResult remove(@PathVariable Long[] jobIds) throws SchedulerException, TaskException
public AjaxResult remove(@PathVariable Long[] jobIds) throws SchedulerException
{
jobService.deleteJobByIds(jobIds);
return success();

View File

@ -3,7 +3,6 @@ package com.ruoyi.quartz.util;
import java.util.Date;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.ruoyi.common.constant.Constants;
@ -31,7 +30,7 @@ public abstract class AbstractQuartzJob implements Job
private static ThreadLocal<Date> threadLocal = new ThreadLocal<>();
@Override
public void execute(JobExecutionContext context) throws JobExecutionException
public void execute(JobExecutionContext context)
{
SysJob sysJob = new SysJob();
BeanUtils.copyBeanProp(sysJob, context.getMergedJobDataMap().get(ScheduleConstants.TASK_PROPERTIES));