|
@@ -94,7 +94,7 @@ public class SysJobController extends BaseController
|
|
*/
|
|
*/
|
|
@PreAuthorize(hasPermi = "monitor:job:edit")
|
|
@PreAuthorize(hasPermi = "monitor:job:edit")
|
|
@Log(title = "定时任务", businessType = BusinessType.UPDATE)
|
|
@Log(title = "定时任务", businessType = BusinessType.UPDATE)
|
|
- @PutMapping
|
|
|
|
|
|
+ @PostMapping("/put")
|
|
public AjaxResult edit(@RequestBody SysJob sysJob) throws SchedulerException, TaskException
|
|
public AjaxResult edit(@RequestBody SysJob sysJob) throws SchedulerException, TaskException
|
|
{
|
|
{
|
|
if (!CronUtils.isValid(sysJob.getCronExpression()))
|
|
if (!CronUtils.isValid(sysJob.getCronExpression()))
|
|
@@ -110,7 +110,7 @@ public class SysJobController extends BaseController
|
|
*/
|
|
*/
|
|
@PreAuthorize(hasPermi = "monitor:job:changeStatus")
|
|
@PreAuthorize(hasPermi = "monitor:job:changeStatus")
|
|
@Log(title = "定时任务", businessType = BusinessType.UPDATE)
|
|
@Log(title = "定时任务", businessType = BusinessType.UPDATE)
|
|
- @PutMapping("/changeStatus")
|
|
|
|
|
|
+ @PostMapping("/changeStatus")
|
|
public AjaxResult changeStatus(@RequestBody SysJob job) throws SchedulerException
|
|
public AjaxResult changeStatus(@RequestBody SysJob job) throws SchedulerException
|
|
{
|
|
{
|
|
SysJob newJob = jobService.selectJobById(job.getJobId());
|
|
SysJob newJob = jobService.selectJobById(job.getJobId());
|
|
@@ -121,9 +121,9 @@ public class SysJobController extends BaseController
|
|
/**
|
|
/**
|
|
* 定时任务立即执行一次
|
|
* 定时任务立即执行一次
|
|
*/
|
|
*/
|
|
- @PreAuthorize(hasPermi = "monitor:job:changeStatus")
|
|
|
|
|
|
+ @PreAuthorize(hasPermi = "monitor:job:run")
|
|
@Log(title = "定时任务", businessType = BusinessType.UPDATE)
|
|
@Log(title = "定时任务", businessType = BusinessType.UPDATE)
|
|
- @PutMapping("/run")
|
|
|
|
|
|
+ @PostMapping("/run")
|
|
public AjaxResult run(@RequestBody SysJob job) throws SchedulerException
|
|
public AjaxResult run(@RequestBody SysJob job) throws SchedulerException
|
|
{
|
|
{
|
|
jobService.run(job);
|
|
jobService.run(job);
|
|
@@ -135,7 +135,7 @@ public class SysJobController extends BaseController
|
|
*/
|
|
*/
|
|
@PreAuthorize(hasPermi = "monitor:job:remove")
|
|
@PreAuthorize(hasPermi = "monitor:job:remove")
|
|
@Log(title = "定时任务", businessType = BusinessType.DELETE)
|
|
@Log(title = "定时任务", businessType = BusinessType.DELETE)
|
|
- @DeleteMapping("/{jobIds}")
|
|
|
|
|
|
+ @GetMapping("/delete/{jobIds}")
|
|
public AjaxResult remove(@PathVariable Long[] jobIds) throws SchedulerException, TaskException
|
|
public AjaxResult remove(@PathVariable Long[] jobIds) throws SchedulerException, TaskException
|
|
{
|
|
{
|
|
jobService.deleteJobByIds(jobIds);
|
|
jobService.deleteJobByIds(jobIds);
|