Код: Выделить всё
@Entity
public class Transaction implements Serializable {
@Id
private Long transactionId;
private Long accountId;
private double accountBalance;
private String transactionCode;
private String state;
private double shippingCost;
private String product;
private LocalDateTime transactionDate;
//...
}
< /code>
класс репозитория: < /p>
@Repository
public class TransactionRepository implements JpaRepository, PagingAndSortingRepository {
Page findAllByTransactionDateAfter(LocalDateTime afterDate);
}
Код: Выделить всё
Page findAllByTransactionDateAfter(LocalDateTime afterDate);< /code>
, которые возвращают транзакции, которые имеют даты после предоставленного последующего.results = transactions.stream().filter(transactionInfo -> transactionInfo.getTransactionDate().isAfter(afterDate)).toList;
Подробнее здесь: https://stackoverflow.com/questions/796 ... parameters