|
@@ -0,0 +1,24 @@
|
|
|
+package com.xt.dsp.controller;
|
|
|
+
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Controller;
|
|
|
+import org.springframework.web.bind.annotation.PathVariable;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
+
|
|
|
+import com.xt.dsp.model.JobBean;
|
|
|
+import com.xt.dsp.service.JobService;
|
|
|
+
|
|
|
+@Controller
|
|
|
+@RequestMapping("job")
|
|
|
+public class JobCtl {
|
|
|
+ @Autowired
|
|
|
+ private JobService jobService;
|
|
|
+
|
|
|
+ @RequestMapping("reschedule/{code}")
|
|
|
+ @ResponseBody
|
|
|
+ public int rescheduleJob(@PathVariable String code) {
|
|
|
+ JobBean job = jobService.selectByCode(code);
|
|
|
+ return jobService.rescheduleJob(job);
|
|
|
+ }
|
|
|
+}
|