Skip to content

Commit

Permalink
Use prepared statements instead of string concatenated SQL everywhere (
Browse files Browse the repository at this point in the history
  • Loading branch information
josemakara2 authored and ptuomola committed Apr 12, 2021
1 parent d3ef3b8 commit 134ea4d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ private LoanProductProvisioningEntryMapper() {
.append(" LEFT JOIN m_loan loan on sch.loan_id = loan.id")
.append(" JOIN m_loanproduct_provisioning_mapping lpm on lpm.product_id = loan.product_id")
.append(" JOIN m_provisioning_criteria_definition pcd on pcd.criteria_id = lpm.criteria_id and ")
.append("(pcd.min_age <= GREATEST(datediff(?").append(",sch.duedate),0) and ").append("GREATEST(datediff(?")
.append(",sch.duedate),0) <= pcd.max_age) and ").append("pcd.criteria_id is not null ")
.append("(pcd.min_age <= GREATEST(datediff(?,sch.duedate),0) and GREATEST(datediff(?")
.append(",sch.duedate),0) <= pcd.max_age) and pcd.criteria_id is not null ")
.append("LEFT JOIN m_client mclient ON mclient.id = loan.client_id ")
.append("LEFT JOIN m_group mgroup ON mgroup.id = loan.group_id ")
.append("where loan.loan_status_id=300 and sch.duedate = ")
Expand Down

0 comments on commit 134ea4d

Please sign in to comment.