Filter fund transfer transaction history to show only last 60 days #72
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Filter fund transfer transaction history to show only last 60 days
Summary
Updates the transaction history retrieval to only return transactions from the last 60 days (instead of all transactions). This change affects the
GET /accounts/transactions/{accountNumber}endpoint.Changes made:
@Temporal(TemporalType.TIME)to@Temporal(TemporalType.TIMESTAMP)in Transaction.java to properly store both date and time (previously only stored time, which wouldn't work for date filtering)findByAccountNumberAndTxDateTimeAfter()in TransactionRepository using Spring Data JPA method naming conventionfindTransactionsByAccountNumber()to calculate 60-day cutoff date and use the new filtered queryReview & Testing Checklist for Human
This is a YELLOW risk PR that requires manual verification:
/accounts/transactions/{accountNumber}endpoint with test data spanning more than 60 days. Verify only transactions from the last 60 days are returned.Test Plan
mvn spring-boot:runNotes
Calendar.add(Calendar.DAY_OF_MONTH, -60)for the cutoff date calculationfindByAccountNumberAndTxDateTimeAfterbased on method naming conventionLink to Devin run: https://app.devin.ai/sessions/0320ed9e95d149b1ba6808a443c74c88
Requested by: Jaime Mizrachi (@jaime-leo)