JobCtl.java 729 B

123456789101112131415161718192021222324
  1. package com.xt.dsp.controller;
  2. import org.springframework.beans.factory.annotation.Autowired;
  3. import org.springframework.stereotype.Controller;
  4. import org.springframework.web.bind.annotation.PathVariable;
  5. import org.springframework.web.bind.annotation.RequestMapping;
  6. import org.springframework.web.bind.annotation.ResponseBody;
  7. import com.xt.dsp.model.JobBean;
  8. import com.xt.dsp.service.JobService;
  9. @Controller
  10. @RequestMapping("job")
  11. public class JobCtl {
  12. @Autowired
  13. private JobService jobService;
  14. @RequestMapping("reschedule/{code}")
  15. @ResponseBody
  16. public int rescheduleJob(@PathVariable String code) {
  17. JobBean job = jobService.selectByCode(code);
  18. return jobService.rescheduleJob(job);
  19. }
  20. }