taskain7 commented on code in PR #2897:
URL: https://github.com/apache/fineract/pull/2897#discussion_r1081292221
##########
fineract-provider/src/main/java/org/apache/fineract/cob/loan/StayedLockedLoansTasklet.java:
##########
@@ -33,16 +39,25 @@
@RequiredArgsConstructor
public class StayedLockedLoansTasklet implements Tasklet {
- private final LoanAccountLockRepository loanAccountLockRepository;
private final BusinessEventNotifierService businessEventNotifierService;
+ private final LoanRepository loanRepository;
@Override
public RepeatStatus execute(StepContribution contribution, ChunkContext
chunkContext) throws Exception {
- List<LoanAccountLock> loanAccountLocks =
loanAccountLockRepository.findAll();
- if (!loanAccountLocks.isEmpty()) {
- List<Long> loanIds =
loanAccountLocks.stream().map(LoanAccountLock::getLoanId).toList();
- businessEventNotifierService.notifyPostBusinessEvent(new
LoanAccountsStayedLockedBusinessEvent(loanIds));
+ LoanAccountsStayedLockedBusinessEvent.Data lockedLoanAccounts =
buildLoanAccountData();
+ if (!lockedLoanAccounts.getLoanAccounts().getLoanAccounts().isEmpty())
{
Review Comment:
used unneccessary wrapper class, removed it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]