|
|
@ -60,7 +60,10 @@ public class StatisticsServiceImpl implements StatisticsService { |
|
|
|
public void runHourlyTaskPart2() { |
|
|
|
LocalDate today = LocalDate.now(); |
|
|
|
Date start = Date.from(today.atStartOfDay(ZoneId.systemDefault()).toInstant()); |
|
|
|
Date end = Date.from(today.plusDays(1).atStartOfDay(ZoneId.systemDefault()).toInstant()); |
|
|
|
Date end = Date.from( |
|
|
|
today.atTime(LocalTime.MAX) // 当天 23:59:59 |
|
|
|
.atZone(ZoneId.systemDefault()) |
|
|
|
.toInstant()); |
|
|
|
List<Statistics> list = statisticsMapper.listPart2All(start, end,today); |
|
|
|
if (!list.isEmpty()) { |
|
|
|
statisticsMapper.batchInsertPart2(list); |
|
|
@ -77,7 +80,10 @@ public class StatisticsServiceImpl implements StatisticsService { |
|
|
|
LocalDate today = LocalDate.now(); |
|
|
|
LocalDate firstDay = today.withDayOfYear(1); |
|
|
|
Date yearStart = Date.from(firstDay.atStartOfDay(ZoneId.systemDefault()).toInstant()); |
|
|
|
Date end = Date.from(today.plusDays(1).atStartOfDay(ZoneId.systemDefault()).toInstant()); |
|
|
|
Date end = Date.from( |
|
|
|
today.atTime(LocalTime.MAX) // 当天 23:59:59 |
|
|
|
.atZone(ZoneId.systemDefault()) |
|
|
|
.toInstant()); |
|
|
|
List<Statistics> list = statisticsMapper.listYearAll(yearStart, end, today); |
|
|
|
if (!list.isEmpty()) { |
|
|
|
statisticsMapper.batchInsertYear(list); |
|
|
|