|
|
@ -75,7 +75,8 @@ public class JobInfoController {
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping("/pageList")
|
|
|
|
@RequestMapping("/pageList")
|
|
|
|
@ResponseBody
|
|
|
|
@ResponseBody
|
|
|
|
public Map<String, Object> pageList(@RequestParam(value = "start", required = false, defaultValue = "0") int start,
|
|
|
|
public Map<String, Object> pageList(HttpServletRequest request,
|
|
|
|
|
|
|
|
@RequestParam(value = "start", required = false, defaultValue = "0") int start,
|
|
|
|
@RequestParam(value = "length", required = false, defaultValue = "10") int length,
|
|
|
|
@RequestParam(value = "length", required = false, defaultValue = "10") int length,
|
|
|
|
@RequestParam("jobGroup") int jobGroup,
|
|
|
|
@RequestParam("jobGroup") int jobGroup,
|
|
|
|
@RequestParam("triggerStatus") int triggerStatus,
|
|
|
|
@RequestParam("triggerStatus") int triggerStatus,
|
|
|
@ -83,6 +84,10 @@ public class JobInfoController {
|
|
|
|
@RequestParam("executorHandler") String executorHandler,
|
|
|
|
@RequestParam("executorHandler") String executorHandler,
|
|
|
|
@RequestParam("author") String author) {
|
|
|
|
@RequestParam("author") String author) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// valid jobGroup permission
|
|
|
|
|
|
|
|
validJobGroupPermission(request, jobGroup);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// page
|
|
|
|
return xxlJobService.pageList(start, length, jobGroup, triggerStatus, jobDesc, executorHandler, author);
|
|
|
|
return xxlJobService.pageList(start, length, jobGroup, triggerStatus, jobDesc, executorHandler, author);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -108,20 +113,23 @@ public class JobInfoController {
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping("/remove")
|
|
|
|
@RequestMapping("/remove")
|
|
|
|
@ResponseBody
|
|
|
|
@ResponseBody
|
|
|
|
public ReturnT<String> remove(@RequestParam("id") int id) {
|
|
|
|
public ReturnT<String> remove(HttpServletRequest request, @RequestParam("id") int id) {
|
|
|
|
return xxlJobService.remove(id);
|
|
|
|
Response<LoginInfo> loginInfoResponse = XxlSsoHelper.loginCheckWithAttr(request);
|
|
|
|
|
|
|
|
return xxlJobService.remove(id, loginInfoResponse.getData());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping("/stop")
|
|
|
|
@RequestMapping("/stop")
|
|
|
|
@ResponseBody
|
|
|
|
@ResponseBody
|
|
|
|
public ReturnT<String> pause(@RequestParam("id") int id) {
|
|
|
|
public ReturnT<String> pause(HttpServletRequest request, @RequestParam("id") int id) {
|
|
|
|
return xxlJobService.stop(id);
|
|
|
|
Response<LoginInfo> loginInfoResponse = XxlSsoHelper.loginCheckWithAttr(request);
|
|
|
|
|
|
|
|
return xxlJobService.stop(id, loginInfoResponse.getData());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping("/start")
|
|
|
|
@RequestMapping("/start")
|
|
|
|
@ResponseBody
|
|
|
|
@ResponseBody
|
|
|
|
public ReturnT<String> start(@RequestParam("id") int id) {
|
|
|
|
public ReturnT<String> start(HttpServletRequest request, @RequestParam("id") int id) {
|
|
|
|
return xxlJobService.start(id);
|
|
|
|
Response<LoginInfo> loginInfoResponse = XxlSsoHelper.loginCheckWithAttr(request);
|
|
|
|
|
|
|
|
return xxlJobService.start(id, loginInfoResponse.getData());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping("/trigger")
|
|
|
|
@RequestMapping("/trigger")
|
|
|
@ -130,11 +138,7 @@ public class JobInfoController {
|
|
|
|
@RequestParam("id") int id,
|
|
|
|
@RequestParam("id") int id,
|
|
|
|
@RequestParam("executorParam") String executorParam,
|
|
|
|
@RequestParam("executorParam") String executorParam,
|
|
|
|
@RequestParam("addressList") String addressList) {
|
|
|
|
@RequestParam("addressList") String addressList) {
|
|
|
|
|
|
|
|
|
|
|
|
// login user
|
|
|
|
|
|
|
|
Response<LoginInfo> loginInfoResponse = XxlSsoHelper.loginCheckWithAttr(request);
|
|
|
|
Response<LoginInfo> loginInfoResponse = XxlSsoHelper.loginCheckWithAttr(request);
|
|
|
|
|
|
|
|
|
|
|
|
// trigger
|
|
|
|
|
|
|
|
return xxlJobService.trigger(loginInfoResponse.getData(), id, executorParam, addressList);
|
|
|
|
return xxlJobService.trigger(loginInfoResponse.getData(), id, executorParam, addressList);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|