Skip to content

Commit

Permalink
add a small changle to LoanAccrualActivityRepository to fix the inj…
Browse files Browse the repository at this point in the history
…ection issue
  • Loading branch information
Zeyad2003 committed Aug 27, 2024
1 parent 1a3c2c1 commit dd88e8c
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@

import java.time.LocalDate;
import java.util.Set;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.Repository;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

public interface LoanAccrualActivityRepository extends Repository<Loan, Long> {
@Repository
public interface LoanAccrualActivityRepository extends JpaRepository<Loan, Long>, JpaSpecificationExecutor<Loan> {

@Query("select loan.id from Loan loan left join LoanTransaction lt on lt.loan = loan and lt.typeOf = 32 and lt.reversed = false and lt.dateOf = :currentDate inner join LoanRepaymentScheduleInstallment rs on rs.loan = loan and rs.isDownPayment = false and rs.additional = false and rs.dueDate = :currentDate where loan.loanRepaymentScheduleDetail.enableAccrualActivityPosting = true and loan.loanStatus = 300 and lt.id is null ")
Set<Long> fetchLoanIdsForAccrualActivityPosting(@Param("currentDate") LocalDate currentDate);
Expand Down

0 comments on commit dd88e8c

Please sign in to comment.