|
@@ -1,22 +1,14 @@
|
|
package com.gyee.benchmarkingimpala.task;
|
|
package com.gyee.benchmarkingimpala.task;
|
|
|
|
|
|
|
|
|
|
-
|
|
|
|
-import com.gyee.benchmarkingimpala.model.auto.Operationrecord;
|
|
|
|
import com.gyee.benchmarkingimpala.service.BenchmarkingService;
|
|
import com.gyee.benchmarkingimpala.service.BenchmarkingService;
|
|
import com.gyee.benchmarkingimpala.util.DateUtils;
|
|
import com.gyee.benchmarkingimpala.util.DateUtils;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.context.annotation.Configuration;
|
|
import org.springframework.context.annotation.Configuration;
|
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
import org.springframework.scheduling.annotation.Scheduled;
|
|
-import org.springframework.web.bind.annotation.CrossOrigin;
|
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
-import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
|
|
-import java.text.ParseException;
|
|
|
|
import java.util.Date;
|
|
import java.util.Date;
|
|
-import java.util.List;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
* @ClassName : SaticScheduleTask
|
|
* @ClassName : SaticScheduleTask
|
|
@@ -37,7 +29,7 @@ public class SaticScheduleTask {
|
|
@Scheduled(cron = "0 0 1 * * ?")
|
|
@Scheduled(cron = "0 0 1 * * ?")
|
|
//或直接指定时间间隔,例如:5秒
|
|
//或直接指定时间间隔,例如:5秒
|
|
//@Scheduled(fixedRate=5000)
|
|
//@Scheduled(fixedRate=5000)
|
|
- private void configureTasks1() {
|
|
|
|
|
|
+ public void configureTasks1() {
|
|
Date yestday = DateUtils.getYestday(new Date());
|
|
Date yestday = DateUtils.getYestday(new Date());
|
|
String date = DateUtils.toDate1(yestday);
|
|
String date = DateUtils.toDate1(yestday);
|
|
String data1 = DateUtils.toDate1(new Date());
|
|
String data1 = DateUtils.toDate1(new Date());
|
|
@@ -58,7 +50,7 @@ public class SaticScheduleTask {
|
|
@Scheduled(cron = "0 0 4 * * ?")
|
|
@Scheduled(cron = "0 0 4 * * ?")
|
|
//或直接指定时间间隔,例如:5秒
|
|
//或直接指定时间间隔,例如:5秒
|
|
//@Scheduled(fixedRate=5000)
|
|
//@Scheduled(fixedRate=5000)
|
|
- private void configureTasks2() {
|
|
|
|
|
|
+ public void configureTasks2() {
|
|
Date yestday = DateUtils.getYestday(new Date());
|
|
Date yestday = DateUtils.getYestday(new Date());
|
|
String date = DateUtils.toDate1(yestday);
|
|
String date = DateUtils.toDate1(yestday);
|
|
String data1 = DateUtils.toDate1(new Date());
|
|
String data1 = DateUtils.toDate1(new Date());
|