|
|
@@ -50,10 +50,7 @@ import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
-import org.springframework.web.bind.annotation.PostMapping;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
import com.fs.app.task.qwTask;
|
|
|
|
|
|
import java.time.*;
|
|
|
@@ -67,12 +64,10 @@ import java.util.*;
|
|
|
public class CommonController {
|
|
|
|
|
|
@Autowired
|
|
|
- private SopLogsTaskService service;
|
|
|
+ private SopLogsTaskService taskService;
|
|
|
@Autowired
|
|
|
private IFsUserCourseVideoService courseVideoService;
|
|
|
@Autowired
|
|
|
- private SopLogsTaskService sopLogsTaskService;
|
|
|
- @Autowired
|
|
|
private SopWxLogsService sopWxLogsService;
|
|
|
@Autowired
|
|
|
private IQwExternalContactService qwExternalContactService;
|
|
|
@@ -175,6 +170,23 @@ public class CommonController {
|
|
|
@Autowired
|
|
|
private IFsIntegralCountService integralCountService;
|
|
|
|
|
|
+
|
|
|
+ @GetMapping("/testTime")
|
|
|
+ public R testTime(String time, String sopId) throws Exception {
|
|
|
+ log.info("进入sop任务");
|
|
|
+ LocalDateTime now = LocalDateTime.now();
|
|
|
+
|
|
|
+ List<String> sopIds = new ArrayList<>();
|
|
|
+ if (StringUtils.isNotEmpty(sopId)) {
|
|
|
+ sopIds = Arrays.asList(sopId.split(","));
|
|
|
+ }
|
|
|
+
|
|
|
+ taskService.selectSopUserLogsListByTime(DateUtil.parseLocalDateTime(time), sopIds);
|
|
|
+ LocalDateTime now1 = LocalDateTime.now();
|
|
|
+ return R.ok().put("start", now).put("end", now1);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
@GetMapping("/UserIntegralCount")
|
|
|
public void UserIntegralCount(){
|
|
|
log.info("=====用户积分每日消耗统计开始=====");
|
|
|
@@ -461,25 +473,6 @@ public class CommonController {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- @GetMapping("/test")
|
|
|
- public R test(String time, String sopId) throws Exception {
|
|
|
- log.info("进入sop任务");
|
|
|
-// LocalDateTime currentTime = DateUtil.parseLocalDateTime(time);
|
|
|
-// // 计算下一个整点时间
|
|
|
-// LocalDateTime nextHourTime = currentTime.withMinute(0).withSecond(0).withNano(0).plusHours(1);
|
|
|
-//
|
|
|
-// // 打印日志,确认时间
|
|
|
-// log.info("任务实际执行时间: {}", currentTime);
|
|
|
-// log.info("传递给任务的时间参数: {}", nextHourTime);
|
|
|
- List<String> sopidList = new ArrayList<>();
|
|
|
- if(StringUtils.isNotEmpty(sopId)){
|
|
|
- sopidList = Arrays.asList(sopId.split(","));
|
|
|
- }
|
|
|
-// sopLogsTaskService.selectSopUserLogsListByTime(DateUtil.parseLocalDateTime(time), sopidList);
|
|
|
- sopWxLogsTaskService.selectSopUserLogsListByTime(DateUtil.parseLocalDateTime(time), sopidList);
|
|
|
- return R.ok();
|
|
|
- }
|
|
|
@GetMapping("/testWx")
|
|
|
public R testWx(String time) throws Exception {
|
|
|
sopWxLogsService.wxSopLogsByTime(DateUtil.parseLocalDateTime(time));
|