|
@@ -0,0 +1,77 @@
|
|
|
|
|
+package com.fs.controller;
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+import com.baidu.dev2.thirdparty.swagger.annotations.Api;
|
|
|
|
|
+import com.fs.app.service.IpadSendServer;
|
|
|
|
|
+import com.fs.app.task.SendSmsMsg;
|
|
|
|
|
+import com.fs.common.core.redis.RedisCacheT;
|
|
|
|
|
+import com.fs.common.utils.DateUtils;
|
|
|
|
|
+import com.fs.common.utils.date.DateUtil;
|
|
|
|
|
+import com.fs.course.domain.FsCourseWatchLog;
|
|
|
|
|
+import com.fs.course.service.IFsCourseWatchLogService;
|
|
|
|
|
+import com.fs.qw.domain.QwUser;
|
|
|
|
|
+import com.fs.qw.mapper.QwPushCountMapper;
|
|
|
|
|
+import com.fs.qw.mapper.QwUserMapper;
|
|
|
|
|
+import com.fs.qw.service.impl.AsyncSopTestService;
|
|
|
|
|
+import com.fs.qw.vo.QwSopCourseFinishTempSetting;
|
|
|
|
|
+import com.fs.qw.vo.QwSopTempSetting;
|
|
|
|
|
+import com.fs.sop.domain.QwSopLogs;
|
|
|
|
|
+import com.fs.sop.mapper.QwSopLogsMapper;
|
|
|
|
|
+import com.fs.sop.service.IQwSopLogsService;
|
|
|
|
|
+import com.fs.sop.service.impl.QwSopLogsServiceImpl;
|
|
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
+import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
+
|
|
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
|
|
+import java.time.LocalDateTime;
|
|
|
|
|
+import java.util.*;
|
|
|
|
|
+import java.util.concurrent.ConcurrentHashMap;
|
|
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
+
|
|
|
|
|
+@Api("公共接口")
|
|
|
|
|
+@RestController
|
|
|
|
|
+@RequestMapping(value="/app/common")
|
|
|
|
|
+@Slf4j
|
|
|
|
|
+public class CommonController {
|
|
|
|
|
+
|
|
|
|
|
+ private final SendSmsMsg sendSmsMsg;
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private QwUserMapper qwUserMapper;
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private QwSopLogsMapper qwSopLogsMapper;
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private IQwSopLogsService qwSopLogsService;
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private AsyncSopTestService asyncSopTestService;
|
|
|
|
|
+
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private RedisCacheT<Long> redisCache;
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private QwPushCountMapper qwPushCountMapper;
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private IFsCourseWatchLogService watchLogService;
|
|
|
|
|
+
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ private IpadSendServer sendServer;
|
|
|
|
|
+
|
|
|
|
|
+ private final Map<Long, Long> qwMap = new ConcurrentHashMap<>();
|
|
|
|
|
+
|
|
|
|
|
+ @Autowired
|
|
|
|
|
+ public CommonController(SendSmsMsg sendSmsMsg) {
|
|
|
|
|
+ this.sendSmsMsg = sendSmsMsg;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ @RequestMapping("/startSendSmsMsg/{num}")
|
|
|
|
|
+ public void startSendSmsMsg(@PathVariable String num) {
|
|
|
|
|
+ log.info("开始启动定时任务");
|
|
|
|
|
+ sendSmsMsg.sendSms(num);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+}
|