幸运24-统计-平台统计-手写sql合并计算
This commit is contained in:
@@ -108,13 +108,19 @@ public class Lucky24RecordAdminService {
|
||||
Date startTime = DateTimeUtil.getBeginTimeOfDay(DateTimeUtil.convertStrToDate(endDate, DateTimeUtil.DEFAULT_DATE_PATTERN));
|
||||
ZonedDateTime zonedStartTime = startTime.toInstant().atZone(ZoneId.systemDefault());
|
||||
Date systemStartTime = Date.from(zonedStartTime.withZoneSameLocal(ZoneId.of(partitionInfo.getZoneId())).toInstant());
|
||||
String zoneDateTableName = DateTimeUtil.convertDate(systemStartTime, DateTimeUtil.DEFAULT_DATE_PATTERN_);
|
||||
|
||||
Date endTime = DateTimeUtil.getEndTimeOfDay(DateTimeUtil.convertStrToDate(endDate, DateTimeUtil.DEFAULT_DATE_PATTERN));
|
||||
ZonedDateTime zonedEndTime = endTime.toInstant().atZone(ZoneId.systemDefault());
|
||||
Date systemEndTime = Date.from(zonedEndTime.withZoneSameLocal(ZoneId.of(partitionInfo.getZoneId())).toInstant());
|
||||
String systemDateTableName = DateTimeUtil.convertDate(systemEndTime, DateTimeUtil.DEFAULT_DATE_PATTERN_);
|
||||
if (zoneDateTableName.equals(systemDateTableName)){
|
||||
systemDateTableName = null;
|
||||
}
|
||||
|
||||
List<Lucky24PlatformStat> list = null == poolType?
|
||||
recordMapper.listPlatform(endDate, partitionId, poolTypeList, systemStartTime, systemEndTime):
|
||||
recordMapper.listPlatformByPoolType(endDate, partitionId, poolTypeList, systemStartTime, systemEndTime);
|
||||
recordMapper.listPlatformManual(endDate, partitionId, poolTypeList, systemStartTime, systemEndTime, zoneDateTableName, systemDateTableName):
|
||||
recordMapper.listPlatformByPoolTypeManual(endDate, partitionId, poolTypeList, systemStartTime, systemEndTime, zoneDateTableName, systemDateTableName);
|
||||
for (Lucky24PlatformStat stat: list) {
|
||||
statMap.put(stat.getDate(), stat);
|
||||
}
|
||||
|
Reference in New Issue
Block a user