ScheduleController.java 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. /**
  13. * 定时任务
  14. *
  15. * @author ruoyi
  16. * @date 2021-11-10
  17. */
  18. @Api(value = "定时任务", tags = {"定时任务管理"})
  19. @RequiredArgsConstructor(onConstructor_ = @Autowired)
  20. @RestController
  21. @RequestMapping("/app/common")
  22. public class ScheduleController extends BaseController {
  23. private final IScheduleService iScheduleService;
  24. /**
  25. * 商品购买发送消息
  26. * @return
  27. */
  28. @ApiOperation("商品购买发送消息")
  29. @GetMapping("/updateGoodsSend")
  30. public AjaxResult updateGoodsSend(UserQueryBo bo) {
  31. iScheduleService.updateGoodsSend(bo);
  32. return AjaxResult.success();
  33. }
  34. /**
  35. * 考试提醒
  36. * @return
  37. */
  38. @ApiOperation("考试预约提醒")
  39. @GetMapping("/updateExamSend")
  40. public AjaxResult updateExamSend(UserQueryBo bo) {
  41. iScheduleService.updateExamSend(bo);
  42. return AjaxResult.success();
  43. }
  44. /**
  45. * 考试提醒
  46. * @return
  47. */
  48. @ApiOperation("每天10点请求的考试提醒")
  49. @GetMapping("/timeSend")
  50. public AjaxResult timeSend(UserQueryBo bo) {
  51. iScheduleService.timeSend(bo);
  52. return AjaxResult.success();
  53. }
  54. /**
  55. * 订单超时关闭
  56. * @return
  57. */
  58. @ApiOperation("订单超时关闭")
  59. @GetMapping("/outTimeOrder")
  60. public AjaxResult outTimeOrder() {
  61. iScheduleService.closeTimeOutOrder();
  62. return AjaxResult.success();
  63. }
  64. /**
  65. * 考试提醒
  66. * @return
  67. */
  68. @ApiOperation("考试预约提醒")
  69. @GetMapping("/issue")
  70. public AjaxResult updateIssue(UserQueryBo bo) {
  71. iScheduleService.updateIssue(bo);
  72. return AjaxResult.success();
  73. }
  74. }