ScheduleController.java 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. package com.zhongzheng.controller.schedule;
  2. import com.zhongzheng.common.core.controller.BaseController;
  3. import com.zhongzheng.common.core.domain.AjaxResult;
  4. import com.zhongzheng.modules.schedule.service.IScheduleService;
  5. import com.zhongzheng.modules.user.bo.UserQueryBo;
  6. import io.swagger.annotations.Api;
  7. import io.swagger.annotations.ApiOperation;
  8. import lombok.RequiredArgsConstructor;
  9. import org.springframework.beans.factory.annotation.Autowired;
  10. import org.springframework.security.access.prepost.PreAuthorize;
  11. import org.springframework.web.bind.annotation.*;
  12. import java.text.ParseException;
  13. /**
  14. * 定时任务
  15. *
  16. * @author ruoyi
  17. * @date 2021-11-10
  18. */
  19. @Api(value = "定时任务", tags = {"定时任务管理"})
  20. @RequiredArgsConstructor(onConstructor_ = @Autowired)
  21. @RestController
  22. @RequestMapping("/app/common")
  23. public class ScheduleController extends BaseController {
  24. private final IScheduleService iScheduleService;
  25. /**
  26. * 商品购买发送消息
  27. * @return
  28. */
  29. @ApiOperation("商品购买发送消息")
  30. @GetMapping("/updateGoodsSend")
  31. public AjaxResult updateGoodsSend(UserQueryBo bo) {
  32. iScheduleService.updateGoodsSend(bo);
  33. return AjaxResult.success();
  34. }
  35. /**
  36. * 考试提醒
  37. * @return
  38. */
  39. @ApiOperation("考试预约提醒")
  40. @GetMapping("/updateExamSend")
  41. public AjaxResult updateExamSend(UserQueryBo bo) {
  42. iScheduleService.updateExamSend(bo);
  43. return AjaxResult.success();
  44. }
  45. /**
  46. * 考试提醒
  47. * @return
  48. */
  49. @ApiOperation("每天10点请求的考试提醒")
  50. @GetMapping("/timeSend")
  51. public AjaxResult timeSend(UserQueryBo bo) {
  52. iScheduleService.timeSend(bo);
  53. return AjaxResult.success();
  54. }
  55. /**
  56. * 订单超时关闭
  57. * @return
  58. */
  59. @ApiOperation("订单超时关闭")
  60. @GetMapping("/outTimeOrder")
  61. public AjaxResult outTimeOrder() {
  62. iScheduleService.closeTimeOutOrder();
  63. return AjaxResult.success();
  64. }
  65. /**
  66. * 考试提醒
  67. * @return
  68. */
  69. @ApiOperation("考试预约提醒")
  70. @GetMapping("/issue")
  71. public AjaxResult updateIssue(UserQueryBo bo) throws ParseException {
  72. iScheduleService.updateIssue(bo);
  73. return AjaxResult.success();
  74. }
  75. /**
  76. * 计划更新每晚0点更新
  77. * @return
  78. */
  79. @ApiOperation("计划更新每晚0点更新")
  80. @GetMapping("/UpPlan")
  81. public AjaxResult UpPlan(UserQueryBo bo){
  82. iScheduleService.UpPlan(bo);
  83. return AjaxResult.success();
  84. }
  85. /**
  86. * 计划更新每晚0点更新
  87. * @return
  88. */
  89. @ApiOperation("更新过期时间")
  90. @GetMapping("/UpExam")
  91. public AjaxResult UpExam(UserQueryBo bo){
  92. iScheduleService.UpExam(bo);
  93. return AjaxResult.success();
  94. }
  95. }