| | |
| | | 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;
|
| | |
| | | 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));
|
| | |
| | | final StringBuilder builder = new StringBuilder(isSimple ? 32 : 36);
|
| | | // time_low
|
| | | builder.append(digits(mostSigBits >> 32, 8));
|
| | | if (false == isSimple)
|
| | | if (!isSimple)
|
| | | {
|
| | | builder.append('-');
|
| | | }
|
| | | // time_mid
|
| | | builder.append(digits(mostSigBits >> 16, 4));
|
| | | if (false == isSimple)
|
| | | if (!isSimple)
|
| | | {
|
| | | builder.append('-');
|
| | | }
|
| | | // time_high_and_version
|
| | | builder.append(digits(mostSigBits, 4));
|
| | | if (false == isSimple)
|
| | | if (!isSimple)
|
| | | {
|
| | | builder.append('-');
|
| | | }
|
| | | // variant_and_sequence
|
| | | builder.append(digits(leastSigBits >> 48, 4));
|
| | | if (false == isSimple)
|
| | | if (!isSimple)
|
| | | {
|
| | | builder.append('-');
|
| | | }
|
| | |
| | | @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();
|
| | |
| | | }
|
| | |
|
| | | /**
|
| | | * 修改代码生成业务
|
| | | * 获取代码生成信息
|
| | | */
|
| | | @PreAuthorize("@ss.hasPermi('tool:gen:query')")
|
| | | @GetMapping(value = "/{talbleId}")
|