|
|
@ -44,7 +44,7 @@ public class StatisticsServiceImpl implements StatisticsService { |
|
|
|
@Override |
|
|
|
@Scheduled(cron = "0 10 * * * ?") // 每小时执行一次 |
|
|
|
public void runHourlyTaskPart1() { |
|
|
|
LocalDate today = LocalDate.now().minusDays(1); //取当天日期 |
|
|
|
LocalDate today = LocalDate.now(); //取当天日期 |
|
|
|
List<Statistics> list = statisticsMapper.listPart1All(today); |
|
|
|
|
|
|
|
if (!list.isEmpty()) { |
|
|
@ -58,7 +58,7 @@ public class StatisticsServiceImpl implements StatisticsService { |
|
|
|
@Override |
|
|
|
@Scheduled(cron = "0 10 * * * ?") // 每小时执行一次 |
|
|
|
public void runHourlyTaskPart2() { |
|
|
|
LocalDate today = LocalDate.now().minusDays(1); |
|
|
|
LocalDate today = LocalDate.now(); |
|
|
|
Date start = Date.from(today.atStartOfDay(ZoneId.systemDefault()).toInstant()); |
|
|
|
Date end = Date.from( |
|
|
|
today.atTime(LocalTime.MAX) // 当天 23:59:59 |
|
|
|