ScheduleController.java 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  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.polyv.bo.PolyvLiveQueryBo;
  5. import com.zhongzheng.modules.polyv.service.IPolyvLiveService;
  6. import com.zhongzheng.modules.schedule.service.IScheduleService;
  7. import com.zhongzheng.modules.user.bo.UserQueryBo;
  8. import io.swagger.annotations.Api;
  9. import io.swagger.annotations.ApiOperation;
  10. import lombok.RequiredArgsConstructor;
  11. import org.springframework.beans.factory.annotation.Autowired;
  12. import org.springframework.security.access.prepost.PreAuthorize;
  13. import org.springframework.web.bind.annotation.*;
  14. import java.text.ParseException;
  15. /**
  16. * 定时任务
  17. *
  18. * @author ruoyi
  19. * @date 2021-11-10
  20. */
  21. @Api(value = "定时任务", tags = {"定时任务管理"})
  22. @RequiredArgsConstructor(onConstructor_ = @Autowired)
  23. @RestController
  24. @RequestMapping("/app/common")
  25. public class ScheduleController extends BaseController {
  26. private final IScheduleService iScheduleService;
  27. private final IPolyvLiveService iPolyvLiveService;
  28. /**
  29. * 商品购买发送消息
  30. * @return
  31. */
  32. @ApiOperation("商品购买发送消息")
  33. @GetMapping("/updateGoodsSend")
  34. public AjaxResult updateGoodsSend(UserQueryBo bo) {
  35. iScheduleService.updateGoodsSend(bo);
  36. return AjaxResult.success();
  37. }
  38. /**
  39. * 考试提醒
  40. * @return
  41. */
  42. @ApiOperation("考试预约提醒")
  43. @GetMapping("/updateExamSend")
  44. public AjaxResult updateExamSend(UserQueryBo bo) {
  45. iScheduleService.updateExamSend(bo);
  46. return AjaxResult.success();
  47. }
  48. /**
  49. * 考试提醒
  50. * @return
  51. */
  52. @ApiOperation("每天10点请求的考试提醒")
  53. @GetMapping("/timeSend")
  54. public AjaxResult timeSend(UserQueryBo bo) {
  55. iScheduleService.timeSend(bo);
  56. return AjaxResult.success();
  57. }
  58. /**
  59. * 订单超时关闭
  60. * @return
  61. */
  62. @ApiOperation("订单超时关闭")
  63. @GetMapping("/outTimeOrder")
  64. public AjaxResult outTimeOrder() {
  65. iScheduleService.closeTimeOutOrder();
  66. return AjaxResult.success();
  67. }
  68. /**
  69. * 考试提醒
  70. * @return
  71. */
  72. @ApiOperation("考试预约提醒")
  73. @GetMapping("/issue")
  74. public AjaxResult updateIssue(UserQueryBo bo) throws ParseException {
  75. iScheduleService.updateIssue(bo);
  76. return AjaxResult.success();
  77. }
  78. /**
  79. * 计划更新每晚0点更新
  80. * @return
  81. */
  82. @ApiOperation("计划更新每晚0点更新")
  83. @GetMapping("/UpPlan")
  84. public AjaxResult UpPlan(UserQueryBo bo){
  85. iScheduleService.UpPlan(bo);
  86. return AjaxResult.success();
  87. }
  88. /**
  89. * 计划更新每晚0点更新
  90. * @return
  91. */
  92. @ApiOperation("更新过期时间")
  93. @GetMapping("/UpExam")
  94. public AjaxResult UpExam(UserQueryBo bo){
  95. iScheduleService.UpExam(bo);
  96. return AjaxResult.success();
  97. }
  98. /**
  99. * 商品下架状态更新
  100. * @return
  101. */
  102. @ApiOperation("更新商品下架状态")
  103. @GetMapping("/UpGoods")
  104. public AjaxResult UpGoods(UserQueryBo bo){
  105. iScheduleService.UpGoods(bo);
  106. return AjaxResult.success();
  107. }
  108. /**
  109. * 商品下架状态更新
  110. * @return
  111. */
  112. @ApiOperation("更新考次次数")
  113. @GetMapping("/UpExamNum")
  114. public AjaxResult UpExamNum(UserQueryBo bo){
  115. iScheduleService.UpExamNum(bo);
  116. return AjaxResult.success();
  117. }
  118. /**
  119. * 报考数据绑定前培
  120. * @return
  121. */
  122. @ApiOperation("报考数据绑定前培")
  123. @GetMapping("/bindBefore")
  124. public AjaxResult bindBefore(UserQueryBo bo){
  125. iScheduleService.bindBefore(bo);
  126. return AjaxResult.success();
  127. }
  128. /**
  129. * 官方信息推送
  130. * @return
  131. */
  132. @ApiOperation("定时官方信息推送")
  133. @GetMapping("/officialInfoPush")
  134. public AjaxResult officialInfoPush(UserQueryBo bo){
  135. iScheduleService.officialInfoPush(bo);
  136. return AjaxResult.success();
  137. }
  138. /**
  139. * 官方学时推送
  140. * @return
  141. */
  142. @ApiOperation("定时官方学时推送")
  143. @GetMapping("/officialPeriodPush")
  144. public AjaxResult officialPeriodPush(UserQueryBo bo){
  145. iScheduleService.officialPeriodPush(bo);
  146. return AjaxResult.success();
  147. }
  148. @ApiOperation("直播结束更新学时")
  149. @GetMapping("/overLive")
  150. public AjaxResult overLive(UserQueryBo bo){
  151. iScheduleService.overLive(bo);
  152. return AjaxResult.success();
  153. }
  154. @ApiOperation("保利威直播结束更新回放")
  155. @GetMapping("/liveToReplay")
  156. public AjaxResult liveToReplay(UserQueryBo bo) throws Exception {
  157. iScheduleService.liveToReplay(bo);
  158. return AjaxResult.success();
  159. }
  160. @ApiOperation("同步保利威场次vid")
  161. @GetMapping("/syncToReplay")
  162. public AjaxResult syncToReplay(UserQueryBo bo) throws Exception {
  163. iScheduleService.syncToReplay(bo);
  164. return AjaxResult.success();
  165. }
  166. @ApiOperation("测试")
  167. @GetMapping("/getChannelVideo")
  168. public AjaxResult getChannelVideo(PolyvLiveQueryBo bo) throws Exception {
  169. iPolyvLiveService.getChannelVideo(bo);
  170. return AjaxResult.success();
  171. }
  172. @ApiOperation("测试1")
  173. @GetMapping("/ListChannelVideoLibrary")
  174. public AjaxResult ListChannelVideoLibrary(PolyvLiveQueryBo bo) throws Exception {
  175. iPolyvLiveService.ListChannelVideoLibrary(bo);
  176. return AjaxResult.success();
  177. }
  178. }