This commit is contained in:
parent
9b26fb2290
commit
60e7c6ac39
1 changed files with 2 additions and 9 deletions
|
|
@ -16,7 +16,6 @@ import java.time.Instant;
|
|||
import java.time.LocalDate;
|
||||
import java.time.ZoneId;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.*;
|
||||
|
||||
import static ru.spcex.clearing.imdg.base.ObjectBaseMapStore.MAX_IN_CLAUSE_SIZE;
|
||||
|
|
@ -77,14 +76,8 @@ public abstract class AbstractSliceMapLoader<T extends WithId> implements Autoco
|
|||
@Override
|
||||
public Iterable<Long> loadAllKeys() {
|
||||
log.debug("loading all keys from {}...", getTableName());
|
||||
LocalDate yesterdayInstant = LocalDate.now().minus(0, ChronoUnit.DAYS);
|
||||
// Instant yesterdayInstant = Instant.now().minus(0, ChronoUnit.DAYS);
|
||||
LocalDate fewDaysAgo = yesterdayInstant.minus(2, ChronoUnit.DAYS);
|
||||
String fieldOfDay = fieldOfDay();
|
||||
List<Long> ids = jdbcTemplate.query("select id from " + getTableName() + " where " + fieldOfDay + " <= ? " +
|
||||
"and " + fieldOfDay + " >= ? ",
|
||||
(resultSet, i) -> resultSet.getLong("id"),
|
||||
yesterdayInstant, fewDaysAgo);
|
||||
List<Long> ids = jdbcTemplate.query("select id from " + getTableName(),
|
||||
(resultSet, i) -> resultSet.getLong("id"));
|
||||
log.debug("loading all keys from {} done; size={}", getTableName(), ids.size());
|
||||
return ids;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue