Skip to content

Commit

Permalink
Fixing DB query on getPaymentsStatusMetrics and getWithdrawalsMetrics
Browse files Browse the repository at this point in the history
  • Loading branch information
Gretchen-z committed Jul 22, 2024
1 parent 07b60f8 commit 1740d61
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
query = """
with p1 as (
select
pm.invoice_id,
coalesce(pr.route_provider_id, -1) as provider_id,
pm.currency_code
pm.invoice_id as invoiceId,
coalesce(pr.route_provider_id, -1) as providerId,
pm.currency_code as currencyCode
from
dw.payment as pm
inner join dw.payment_route as pr on pm.invoice_id = pr.invoice_id
Expand All @@ -23,10 +23,10 @@ and pr.route_provider_id not in (1)
)
select
p1.*,
p.name as provider_name
p.name as providerName
from
p1
inner join dw.provider as p on p1.provider_id = p.provider_ref_id
inner join dw.provider as p on p1.providerId = p.provider_ref_id
and p.current
""",
resultSetMapping = "PaymentsAggregatedMetricDtoList")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
query = """
with w1 as (
select
w.withdrawal_id,
coalesce(w.provider_id, -1) as provider_id,
w.currency_code
w.withdrawal_id as withdrawalId,
coalesce(w.provider_id, -1) as providerId,
w.currency_code as currencyCode
from
dw.withdrawal as w
where w.withdrawal_id in :withdrawalIds
Expand All @@ -21,10 +21,10 @@ and provider_id not in (1)
)
select
w1.*,
p.name as provider_name
p.name as providerName
from
w1
inner join dw.provider as p on w1.provider_id = p.provider_ref_id
inner join dw.provider as p on w1.providerId = p.provider_ref_id
and p.current;
""",
resultSetMapping = "WithdrawalsAggregatedMetricDtoList")
Expand Down

0 comments on commit 1740d61

Please sign in to comment.