实现自动脚本修改产品状态
This commit is contained in:
@@ -154,7 +154,15 @@ public class SysJobController extends BaseController
|
||||
@PutMapping("/changeStatus")
|
||||
public AjaxResult changeStatus(@RequestBody SysJob job) throws SchedulerException
|
||||
{
|
||||
if (job == null || job.getJobId() == null)
|
||||
{
|
||||
return error("任务ID不能为空,请刷新列表后重试");
|
||||
}
|
||||
SysJob newJob = jobService.selectJobById(job.getJobId());
|
||||
if (newJob == null)
|
||||
{
|
||||
return error("任务不存在或已被删除,请刷新列表后重试");
|
||||
}
|
||||
newJob.setStatus(job.getStatus());
|
||||
return toAjax(jobService.changeStatus(newJob));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user