FINERACT-1724: Add missing Params annotations
This commit is contained in:
+2
-1
@@ -22,11 +22,12 @@ import java.util.List;
|
||||
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.query.Param;
|
||||
|
||||
public interface LoanCollateralManagementRepository
|
||||
extends JpaRepository<LoanCollateralManagement, Long>, JpaSpecificationExecutor<LoanCollateralManagement> {
|
||||
|
||||
@Query("select loanCollaterals from LoanCollateralManagement loanCollaterals where loanCollaterals.loan=:loan")
|
||||
List<LoanCollateralManagement> findByLoan(Loan loan);
|
||||
List<LoanCollateralManagement> findByLoan(@Param("loan") Loan loan);
|
||||
|
||||
}
|
||||
|
||||
+6
-4
@@ -25,6 +25,7 @@ import org.apache.fineract.portfolio.loanaccount.data.LoanScheduleDelinquencyDat
|
||||
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.query.Param;
|
||||
|
||||
public interface LoanRepaymentScheduleInstallmentRepository
|
||||
extends JpaRepository<LoanRepaymentScheduleInstallment, Long>, JpaSpecificationExecutor<LoanRepaymentScheduleInstallment> {
|
||||
@@ -42,8 +43,8 @@ public interface LoanRepaymentScheduleInstallmentRepository
|
||||
lrs.loan.loanProduct.delinquencyBucket IS NOT NULL
|
||||
GROUP BY lrs.loan
|
||||
""")
|
||||
Collection<LoanScheduleDelinquencyData> fetchLoanScheduleDataByDueDateAndObligationsMet(Integer loanStatus, LocalDate businessDate,
|
||||
boolean obligationsMet);
|
||||
Collection<LoanScheduleDelinquencyData> fetchLoanScheduleDataByDueDateAndObligationsMet(@Param("loanStatus") Integer loanStatus,
|
||||
@Param("businessDate") LocalDate businessDate, @Param("obligationsMet") boolean obligationsMet);
|
||||
|
||||
@Query("""
|
||||
SELECT new org.apache.fineract.portfolio.loanaccount.data.LoanScheduleDelinquencyData(
|
||||
@@ -59,7 +60,8 @@ public interface LoanRepaymentScheduleInstallmentRepository
|
||||
lrs.loan.id NOT IN :loanIds
|
||||
GROUP BY lrs.loan
|
||||
""")
|
||||
Collection<LoanScheduleDelinquencyData> fetchLoanScheduleDataByDueDateAndObligationsMet(Integer loanStatus, LocalDate businessDate,
|
||||
boolean obligationsMet, List<Long> loanIds);
|
||||
Collection<LoanScheduleDelinquencyData> fetchLoanScheduleDataByDueDateAndObligationsMet(@Param("loanStatus") Integer loanStatus,
|
||||
@Param("businessDate") LocalDate businessDate, @Param("obligationsMet") boolean obligationsMet,
|
||||
@Param("loanIds") List<Long> loanIds);
|
||||
|
||||
}
|
||||
|
||||
+2
-1
@@ -22,10 +22,11 @@ import java.util.Optional;
|
||||
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.query.Param;
|
||||
|
||||
public interface LoanRescheduleRequestRepository
|
||||
extends JpaRepository<LoanRescheduleRequest, Long>, JpaSpecificationExecutor<LoanRescheduleRequest> {
|
||||
|
||||
@Query("select lrr.loan.id from LoanRescheduleRequest lrr where lrr.id = :rescheduleRequestId")
|
||||
Optional<Long> getLoanIdByRescheduleRequestId(Long rescheduleRequestId);
|
||||
Optional<Long> getLoanIdByRescheduleRequestId(@Param("rescheduleRequestId") Long rescheduleRequestId);
|
||||
}
|
||||
|
||||
+2
-1
@@ -20,6 +20,7 @@ package org.apache.fineract.useradministration.domain;
|
||||
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
public interface PermissionRepository extends JpaRepository<Permission, Long> {
|
||||
|
||||
@@ -28,5 +29,5 @@ public interface PermissionRepository extends JpaRepository<Permission, Long> {
|
||||
// Also, trimming leading and trailing spaces is critical ("CREATE_STANDINGINSTRUCTION" vs
|
||||
// "CREATE_STANDINGINSTRUCTION ").
|
||||
@Query("SELECT p FROM Permission p WHERE LOWER(TRIM(BOTH FROM p.code)) = LOWER(TRIM(BOTH FROM ?1))")
|
||||
Permission findOneByCode(String code);
|
||||
Permission findOneByCode(@Param("code") String code);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user