clearing-service http://jira.mfd.msk:8088/browse/CLS-647 добавил логи
This commit is contained in:
parent
96a0ef78aa
commit
0815f66ee7
2 changed files with 12 additions and 0 deletions
|
|
@ -99,12 +99,16 @@ public class BalanceRevise implements ISessionStage {
|
||||||
Collection<Long> currencies = currencyImdg.projectSingleAttribute("id");
|
Collection<Long> currencies = currencyImdg.projectSingleAttribute("id");
|
||||||
Long millis = null;
|
Long millis = null;
|
||||||
if (fromTime != null) {
|
if (fromTime != null) {
|
||||||
|
log.debug("sendSdf, parameter fromTime={}", fromTime);
|
||||||
Instant fromInstant = TimeUtil.localDateTimeToInstant(LocalDateTime.of(LocalDate.now(), fromTime));
|
Instant fromInstant = TimeUtil.localDateTimeToInstant(LocalDateTime.of(LocalDate.now(), fromTime));
|
||||||
millis = fromInstant.toEpochMilli();
|
millis = fromInstant.toEpochMilli();
|
||||||
} else {
|
} else {
|
||||||
Statement statement = statementImdg.aggregateByMax("created", StatementRevisePredicate.get(statementImdg, currencies));
|
Statement statement = statementImdg.aggregateByMax("created", StatementRevisePredicate.get(statementImdg, currencies));
|
||||||
if (statement != null) {
|
if (statement != null) {
|
||||||
|
log.debug("sendSdf, parameter fromTime not set, use max(statement.created)={}", statement.getCreated());
|
||||||
millis = statement.getCreated().toEpochMilli();
|
millis = statement.getCreated().toEpochMilli();
|
||||||
|
} else {
|
||||||
|
log.debug("sendSdf, parameter fromTime not set, and statement's not found.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
newSDf56(millis);
|
newSDf56(millis);
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.*;
|
import static org.junit.jupiter.api.Assertions.*;
|
||||||
|
|
||||||
|
|
@ -15,4 +16,11 @@ class TimeUtilTest {
|
||||||
LocalDate date2 = TimeUtil.toLocalDate(date1);
|
LocalDate date2 = TimeUtil.toLocalDate(date1);
|
||||||
assertEquals("2009-02-14", date2.toString());
|
assertEquals("2009-02-14", date2.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void localDateTimeToInstant() {
|
||||||
|
Instant theI = TimeUtil.localDateTimeToInstant(LocalDateTime.of(2024, 2, 9, 10, 11, 22));
|
||||||
|
assertEquals("2024-02-09T07:11:22Z", theI.toString()); // msk = UTC+3
|
||||||
|
assertEquals(1707462682L, theI.getEpochSecond());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Loading…
Add table
Reference in a new issue