123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427 |
- package com.zhongzheng.controller.schedule;
- import com.zhongzheng.common.core.controller.BaseController;
- import com.zhongzheng.common.core.domain.AjaxResult;
- import com.zhongzheng.framework.web.service.AsyncService;
- import com.zhongzheng.framework.web.service.WxLoginService;
- import com.zhongzheng.modules.exam.bo.ExamApplyQueryBo;
- import com.zhongzheng.modules.polyv.service.IPolyvLiveService;
- import com.zhongzheng.modules.schedule.service.IScheduleService;
- import com.zhongzheng.modules.user.bo.UserQueryBo;
- import com.zhongzheng.modules.user.bo.UserWxFollowQueryBo;
- import com.zhongzheng.modules.wx.bo.WxLoginBody;
- import io.swagger.annotations.Api;
- import io.swagger.annotations.ApiOperation;
- import lombok.RequiredArgsConstructor;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.GetMapping;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RestController;
- import java.text.ParseException;
- import java.util.Arrays;
- import java.util.List;
- import java.util.Map;
- /**
- * 定时任务
- *
- * @author ruoyi
- * @date 2021-11-10
- */
- @Api(value = "定时任务", tags = {"定时任务管理"})
- @RequiredArgsConstructor(onConstructor_ = @Autowired)
- @RestController
- @RequestMapping("/app/common")
- public class ScheduleController extends BaseController {
- private final IScheduleService iScheduleService;
- private final IPolyvLiveService iPolyvLiveService;
- private final AsyncService asyncService;
- private final WxLoginService wxLoginService;
- /**
- * 商品购买发送消息
- * @return
- */
- @ApiOperation("商品购买发送消息")
- @GetMapping("/updateGoodsSend")
- public AjaxResult updateGoodsSend(UserQueryBo bo) {
- iScheduleService.updateGoodsSend(bo);
- return AjaxResult.success();
- }
- /**
- * 考试提醒
- * @return
- */
- @ApiOperation("考试预约提醒")
- @GetMapping("/updateExamSend")
- public AjaxResult updateExamSend(UserQueryBo bo) {
- iScheduleService.updateExamSend(bo);
- return AjaxResult.success();
- }
- /**
- * 考试提醒
- * @return
- */
- @ApiOperation("每天10点请求的考试提醒")
- @GetMapping("/timeSend")
- public AjaxResult timeSend(UserQueryBo bo) {
- iScheduleService.timeSend(bo);
- return AjaxResult.success();
- }
- /**
- * 订单超时关闭
- * @return
- */
- @ApiOperation("订单超时关闭")
- @GetMapping("/outTimeOrder")
- public AjaxResult outTimeOrder() {
- iScheduleService.closeTimeOutOrder();
- return AjaxResult.success();
- }
- /**
- * 考试提醒
- * @return
- */
- @ApiOperation("考试预约提醒")
- @GetMapping("/issue")
- public AjaxResult updateIssue(UserQueryBo bo) throws ParseException {
- iScheduleService.updateIssue(bo);
- return AjaxResult.success();
- }
- /**
- * 计划更新每晚0点更新
- * @return
- */
- @ApiOperation("计划更新每晚0点更新")
- @GetMapping("/UpPlan")
- public AjaxResult UpPlan(UserQueryBo bo){
- iScheduleService.UpPlan(bo);
- return AjaxResult.success();
- }
- /**
- * 计划更新每晚0点更新
- * @return
- */
- @ApiOperation("更新过期时间")
- @GetMapping("/UpExam")
- public AjaxResult UpExam(UserQueryBo bo){
- iScheduleService.UpExam(bo);
- return AjaxResult.success();
- }
- /**
- * 商品下架状态更新
- * @return
- */
- @ApiOperation("更新商品下架状态")
- @GetMapping("/UpGoods")
- public AjaxResult UpGoods(UserQueryBo bo){
- iScheduleService.UpGoods(bo);
- return AjaxResult.success();
- }
- /**
- * 商品下架状态更新
- * @return
- */
- @ApiOperation("更新考次次数")
- @GetMapping("/UpExamNum")
- public AjaxResult UpExamNum(UserQueryBo bo){
- iScheduleService.UpExamNum(bo);
- return AjaxResult.success();
- }
- /**
- * 报考数据绑定前培
- * @return
- */
- @ApiOperation("报考数据绑定前培")
- @GetMapping("/bindBefore")
- public AjaxResult bindBefore(UserQueryBo bo){
- iScheduleService.bindBefore(bo);
- return AjaxResult.success();
- }
- /**
- * 官方信息推送
- * @return
- */
- @ApiOperation("定时官方信息推送")
- @GetMapping("/officialInfoPush")
- public AjaxResult officialInfoPush(UserQueryBo bo){
- iScheduleService.officialInfoPush(bo);
- return AjaxResult.success();
- }
- /**
- * 官方学时推送
- * @return
- */
- @ApiOperation("定时官方学时推送")
- @GetMapping("/officialPeriodPush")
- public AjaxResult officialPeriodPush(UserQueryBo bo){
- iScheduleService.officialPeriodPush(bo);
- return AjaxResult.success();
- }
- @ApiOperation("直播结束更新学时")
- @GetMapping("/overLive")
- public AjaxResult overLive(UserQueryBo bo){
- iScheduleService.overLive(bo);
- return AjaxResult.success();
- }
- @ApiOperation("保利威直播结束更新回放")
- @GetMapping("/liveToReplay")
- public AjaxResult liveToReplay(UserQueryBo bo) throws Exception {
- iScheduleService.liveToReplay(bo);
- return AjaxResult.success();
- }
- @ApiOperation("同步保利威场次vid")
- @GetMapping("/syncToReplay")
- public AjaxResult syncToReplay(UserQueryBo bo) throws Exception {
- iScheduleService.syncToReplay(bo);
- return AjaxResult.success();
- }
- /**
- * 模考预约提醒
- * @return
- */
- @ApiOperation("模考预约提醒")
- @GetMapping("/sendMockSubscribe")
- public AjaxResult sendMockSubscribe(UserQueryBo bo) {
- iScheduleService.sendMockSubscribe(bo);
- return AjaxResult.success();
- }
- /**
- * 模考开始提醒
- * @return
- */
- @ApiOperation("模考开始前60分钟提醒")
- @GetMapping("/mockTimeSend")
- public AjaxResult mockTimeSend(UserQueryBo bo) {
- iScheduleService.mockTimeSend(bo);
- return AjaxResult.success();
- }
- /**
- * 模考直播提醒
- * @return
- */
- @ApiOperation("模考直播开始前60分钟提醒")
- @GetMapping("/mockLiveSend")
- public AjaxResult mockLiveSend(UserQueryBo bo) {
- iScheduleService.mockLiveSend(bo);
- return AjaxResult.success();
- }
- @ApiOperation("获取关注列表")
- @GetMapping("/syncFollowList")
- public AjaxResult syncFollowList(){
- WxLoginBody loginBody = new WxLoginBody();
- wxLoginService.getWxGzhUserList(loginBody.getNextOpenid());
- return AjaxResult.success();
- }
- @ApiOperation("同步union")
- @GetMapping("/syncUnion")
- public AjaxResult syncUnion(){
- UserWxFollowQueryBo bo = new UserWxFollowQueryBo();
- asyncService.executeAsync(bo,0);
- return AjaxResult.success();
- }
- @ApiOperation("学生购买2天未学习提醒")
- @GetMapping("/buyNotReadToStudentTwo")
- public AjaxResult buyNotReadToStudentTwo(UserQueryBo bo){
- iScheduleService.buyNotReadToStudentTwo(bo);
- return AjaxResult.success();
- }
- @ApiOperation("学生购买5天未学习提醒")
- @GetMapping("/buyNotReadToStudentFive")
- public AjaxResult buyNotReadToStudentFive(UserQueryBo bo){
- iScheduleService.buyNotReadToStudentFive(bo);
- return AjaxResult.success();
- }
- @ApiOperation("学生购买15天未学习提醒")
- @GetMapping("/buyNotReadToStudentFifteen")
- public AjaxResult buyNotReadToStudentFifteen(UserQueryBo bo){
- iScheduleService.buyNotReadToStudentFifteen(bo);
- return AjaxResult.success();
- }
- @ApiOperation("学生购买30天未学习提醒")
- @GetMapping("/buyNotReadToStudentThirty")
- public AjaxResult buyNotReadToStudentThirty(UserQueryBo bo){
- iScheduleService.buyNotReadToStudentThirty(bo);
- return AjaxResult.success();
- }
- @ApiOperation("学生购买55天未学习提醒")
- @GetMapping("/buyNotReadToStudentFiftyFive")
- public AjaxResult buyNotReadToStudentFiftyFive(UserQueryBo bo){
- iScheduleService.buyNotReadToStudentFiftyFive(bo);
- return AjaxResult.success();
- }
- @ApiOperation("学生购买7天未学习教务提醒")
- @GetMapping("/buyNotReadToTeacher")
- public AjaxResult buyNotReadToTeacher(UserQueryBo bo){
- iScheduleService.buyNotReadToTeacher(bo);
- return AjaxResult.success();
- }
- @ApiOperation("学生购买15天未学习教务提醒")
- @GetMapping("/buyNotReadToTeacherFifteen")
- public AjaxResult buyNotReadToTeacherFifteen(UserQueryBo bo){
- iScheduleService.buyNotReadToTeacherFifteen(bo);
- return AjaxResult.success();
- }
- @ApiOperation("学生购买30天未学习教务提醒")
- @GetMapping("/buyNotReadToTeacherThirty")
- public AjaxResult buyNotReadToTeacherThirty(UserQueryBo bo){
- iScheduleService.buyNotReadToTeacherThirty(bo);
- return AjaxResult.success();
- }
- @ApiOperation("学生购买55天未学习教务提醒")
- @GetMapping("/buyNotReadToTeacherFiftyFive")
- public AjaxResult buyNotReadToTeacherFiftyFive(UserQueryBo bo){
- iScheduleService.buyNotReadToTeacherFiftyFive(bo);
- return AjaxResult.success();
- }
- @ApiOperation("学生长时间3天未学习提醒")
- @GetMapping("/longNotReadToStudentThree")
- public AjaxResult longNotReadToStudentThree(UserQueryBo bo){
- iScheduleService.longNotReadToStudentThree(bo);
- return AjaxResult.success();
- }
- @ApiOperation("学生长时间5天未学习提醒")
- @GetMapping("/longNotReadToStudentFive")
- public AjaxResult longNotReadToStudentFive(UserQueryBo bo){
- iScheduleService.longNotReadToStudentFive(bo);
- return AjaxResult.success();
- }
- @ApiOperation("学生长时间7天未学习教务提醒")
- @GetMapping("/longNotReadToTeacher")
- public AjaxResult longNotReadToTeacher(UserQueryBo bo){
- iScheduleService.longNotReadToTeacher(bo);
- return AjaxResult.success();
- }
- @ApiOperation("同步智慧考场")
- @GetMapping("/syncExamSite")
- public AjaxResult syncExamSite(UserQueryBo bo){
- iScheduleService.wisdomExamSite(bo);
- return AjaxResult.success();
- }
- @ApiOperation("批量同步考试计划用户")
- @GetMapping("/syncApplyUserInfo")
- public AjaxResult<Map<String,Object>> wisdomSyncApplyUserInfo(ExamApplyQueryBo bo){
- return AjaxResult.success(iScheduleService.wisdomSyncApplyUserInfo(bo));
- }
- @ApiOperation("同步考生考试状态信息")
- @GetMapping("/wisdomSyncExamStatus")
- public AjaxResult wisdomSyncExamStatus(ExamApplyQueryBo bo){
- iScheduleService.wisdomSyncExamStatus(bo);
- return AjaxResult.success();
- }
- @ApiOperation("同步考试视频信息")
- @GetMapping("/wisdomSyncExamVideo")
- public AjaxResult wisdomSyncExamVideo(ExamApplyQueryBo bo){
- iScheduleService.wisdomSyncExamVideo(bo);
- return AjaxResult.success();
- }
- @ApiOperation("手动刷新token")
- @GetMapping("/refreshToken")
- public AjaxResult refreshToken(UserQueryBo bo){
- iScheduleService.refreshToken(bo);
- return AjaxResult.success();
- }
- @ApiOperation("每日一练未打卡提醒")
- @GetMapping("/toDayExamNotRecordWarn")
- public AjaxResult toDayExamNotRecordWarn(){
- iScheduleService.toDayExamNotRecordWarn();
- return AjaxResult.success();
- }
- @ApiOperation("课程试卷未做完3天提醒")
- @GetMapping("/noFinishExamToStudentThree")
- public AjaxResult noFinishExamToStudentThree(UserQueryBo bo){
- iScheduleService.noFinishExamToStudentThree(bo);
- return AjaxResult.success();
- }
- @ApiOperation("课程试卷未做完5天提醒")
- @GetMapping("/noFinishExamToStudentFive")
- public AjaxResult noFinishExamToStudentFive(UserQueryBo bo){
- iScheduleService.noFinishExamToStudentFive(bo);
- return AjaxResult.success();
- }
- @ApiOperation("课程试卷未做完7天提醒")
- @GetMapping("/noFinishExamToStudentSeven")
- public AjaxResult noFinishExamToStudentSeven(UserQueryBo bo){
- iScheduleService.noFinishExamToStudentSeven(bo);
- return AjaxResult.success();
- }
- @ApiOperation("同步机构商品")
- @GetMapping("/synchronization/goods")
- public AjaxResult synchronizationGoods(){
- //湛江云学堂 972001468256950403
- //茂名市建设培训学校 680980002459417532
- //肇庆市建筑业协会 480813706424615769
- // List<String> tenantIds = Arrays.asList("972001468256950403", "680980002459417532", "480813706424615769");
- List<String> tenantIds = Arrays.asList("24330002165216496");
- tenantIds.forEach(tenantId -> {
- iScheduleService.synchronizationGoodsByTenantId(tenantId);
- });
- return AjaxResult.success();
- }
- @ApiOperation("处理商品关联")
- @GetMapping("/goods/dispose")
- public AjaxResult goodsDispose(){
- iScheduleService.goodsDispose();
- return AjaxResult.success();
- }
- @ApiOperation("同步一建商品(山西)")
- @GetMapping("/goods/copy/one")
- public AjaxResult goodsCopyOne(){
- iScheduleService.goodsCopyOne();
- return AjaxResult.success();
- }
- }
|