新增自定义数据校验
This commit is contained in:
@ -6,6 +6,7 @@ import org.quartz.SchedulerException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@ -125,7 +126,7 @@ public class SysJobController extends BaseController
|
||||
@RequiresPermissions("monitor:job:add")
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(SysJob job) throws SchedulerException, TaskException
|
||||
public AjaxResult addSave(@Validated SysJob job) throws SchedulerException, TaskException
|
||||
{
|
||||
return toAjax(jobService.insertJob(job));
|
||||
}
|
||||
@ -147,7 +148,7 @@ public class SysJobController extends BaseController
|
||||
@RequiresPermissions("monitor:job:edit")
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(SysJob job) throws SchedulerException, TaskException
|
||||
public AjaxResult editSave(@Validated SysJob job) throws SchedulerException, TaskException
|
||||
{
|
||||
return toAjax(jobService.updateJob(job));
|
||||
}
|
||||
|
Reference in New Issue
Block a user