| | |
| | | @GetMapping(value = "/{jobId}")
|
| | | public AjaxResult getInfo(@PathVariable("jobId") Long jobId)
|
| | | {
|
| | | return AjaxResult.success(jobService.selectJobById(jobId));
|
| | | return success(jobService.selectJobById(jobId));
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | @PutMapping("/run")
|
| | | public AjaxResult run(@RequestBody SysJob job) throws SchedulerException
|
| | | {
|
| | | jobService.run(job);
|
| | | return AjaxResult.success();
|
| | | boolean result = jobService.run(job);
|
| | | return result ? success() : error("任务不存在或已过期!");
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | public AjaxResult remove(@PathVariable Long[] jobIds) throws SchedulerException, TaskException
|
| | | {
|
| | | jobService.deleteJobByIds(jobIds);
|
| | | return AjaxResult.success();
|
| | | return success();
|
| | | }
|
| | | }
|