实现自动脚本修改产品状态

This commit is contained in:
wuweihua
2026-09-09 17:56:53 +08:00
parent db0c5919b0
commit 06294d636a
9 changed files with 191 additions and 2 deletions
@@ -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));
}