taskain7 commented on code in PR #3112:
URL: https://github.com/apache/fineract/pull/3112#discussion_r1163877238


##########
fineract-provider/src/main/java/org/apache/fineract/cob/loan/ApplyLoanLockTasklet.java:
##########
@@ -46,11 +50,15 @@ public class ApplyLoanLockTasklet implements Tasklet {
     private final LoanAccountLockRepository accountLockRepository;
     private final FineractProperties fineractProperties;
     private final JdbcTemplate jdbcTemplate;
+    private final LoanRepository loanRepository;
 
     @Override
     public RepeatStatus execute(@NotNull StepContribution contribution, 
@NotNull ChunkContext chunkContext) throws Exception {
         ExecutionContext executionContext = 
contribution.getStepExecution().getExecutionContext();
-        List<Long> loanIds = (List<Long>) 
executionContext.get(LoanCOBConstant.LOAN_IDS);
+        LoanCOBMinANdMaxLoanId loanCOBMinANdMaxLoanId = 
(LoanCOBMinANdMaxLoanId) executionContext.get(LoanCOBConstant.LOAN_IDS);
+        List<Long> loanIds = new ArrayList<>(
+                
loanRepository.findAllNonClosedLoansBehindOrNullByMinAndMaxLoanId(loanCOBMinANdMaxLoanId.getMinLoanId(),

Review Comment:
   I use it with 0 values, and check it in later steps



##########
fineract-provider/src/main/java/org/apache/fineract/cob/loan/LoanItemReader.java:
##########
@@ -36,7 +39,9 @@ public LoanItemReader(LoanRepository loanRepository) {
     @SuppressWarnings({ "unchecked" })
     public void beforeStep(@NotNull StepExecution stepExecution) {
         ExecutionContext executionContext = 
stepExecution.getExecutionContext();
-        List<Long> loanIds = (List<Long>) 
executionContext.get(LoanCOBConstant.LOAN_IDS);
+        LoanCOBMinANdMaxLoanId loanCOBMinANdMaxLoanId = 
(LoanCOBMinANdMaxLoanId) executionContext.get(LoanCOBConstant.LOAN_IDS);
+        List<Long> loanIds = 
loanRepository.findAllNonClosedLoansBehindOrNullByMinAndMaxLoanId(loanCOBMinANdMaxLoanId.getMinLoanId(),

Review Comment:
   I use it with 0 values, and check 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]

Reply via email to