幸运24-统计-强制使用索引
This commit is contained in:
@@ -17,14 +17,14 @@ public class DiamondStatTask extends BaseTask {
|
||||
@Autowired
|
||||
private DiamondStatService service;
|
||||
|
||||
@Scheduled(cron = "0 0 0 * * ?")
|
||||
@Scheduled(cron = "0 10 0 * * ?")
|
||||
public void statEn() {
|
||||
List<Integer> partitionIds = List.of(PartitionEnum.ENGLISH.getId(), PartitionEnum.CHINESE.getId(), PartitionEnum.ENGLISH2.getId());
|
||||
Date now = new Date();
|
||||
service.stat(partitionIds, now);
|
||||
}
|
||||
|
||||
@Scheduled(cron = "0 0 5 * * ?")
|
||||
@Scheduled(cron = "0 10 0 * * ?", zone = "Asia/Riyadh")
|
||||
public void statAr() {
|
||||
List<Integer> partitionIds = List.of(PartitionEnum.ARAB.getId(), PartitionEnum.TURKEY.getId());
|
||||
Date now = new Date();
|
||||
|
@@ -79,6 +79,9 @@ public class Lucky24Task {
|
||||
if (zdt.getDayOfYear() == hourAgo.getDayOfYear()){
|
||||
continue;
|
||||
}
|
||||
|
||||
String zoneDate = hourAgo.format(DateTimeUtil.dateFormatter);
|
||||
|
||||
bizExecutor.execute(() -> {
|
||||
// 获取当天的第一秒
|
||||
ZonedDateTime startOfDay = hourAgo.withHour(0)
|
||||
@@ -94,10 +97,10 @@ public class Lucky24Task {
|
||||
ZonedDateTime endOfDay = hourAgo.withHour(23)
|
||||
.withMinute(59)
|
||||
.withSecond(59)
|
||||
.withNano(999999999);
|
||||
.withNano(999);
|
||||
Date systemEndTime = DateTimeUtil.converLocalDateTimeToDate(endOfDay.withZoneSameInstant(ZoneId.systemDefault()).toLocalDateTime());
|
||||
|
||||
service.statDate(partitionInfo.getId(), systemStartTime, systemEndTime, zoneIdHour);
|
||||
service.statDate(partitionInfo.getId(), systemStartTime, systemEndTime, zoneIdHour, zoneDate);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user