refactor(系统设置): 优化定时任务修改规则
This commit is contained in:
parent
e799f147f5
commit
ad1c56290e
|
@ -65,11 +65,11 @@ public class TaskCenterController {
|
|||
taskCenterService.enable(id);
|
||||
}
|
||||
|
||||
@PostMapping("/schedule/update/{id}/{cron}")
|
||||
@PostMapping("/schedule/update/{id}")
|
||||
@Operation(summary = "系统-任务中心-修改定时任务")
|
||||
@CheckOwner(resourceId = "#id", resourceType = "schedule")
|
||||
public void update(@PathVariable String id, @PathVariable String cron) {
|
||||
taskCenterService.update(id, cron);
|
||||
public void update(@PathVariable String id, @RequestBody Object cron) {
|
||||
taskCenterService.update(id, cron.toString());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -193,6 +193,6 @@ class TaskCenterScheduleControllerTests extends BaseTest {
|
|||
scheduleService.getScheduleByResource(schedule.getResourceId(), schedule.getJob());
|
||||
this.requestGet("/task/center/schedule/switch" + "test-schedule-switch");
|
||||
this.requestGet("/task/center/schedule/switch" + "test-schedule-switch");
|
||||
this.requestGet("/task/center/schedule/update/" + "test-schedule-switch" + "/0 0/2 * * * ?");
|
||||
this.requestPost("/task/center/schedule/update/" + "test-schedule-switch" ,"/0 0/2 * * * ?");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue