fix/join_on_devices_table
This commit is contained in:
parent
5c5d956d2c
commit
241fc5e538
1 changed files with 2 additions and 2 deletions
|
|
@ -56,7 +56,7 @@ function batch (
|
|||
((NOT txs.send_confirmed) AND (txs.created <= now() - interval $1)) AS expired
|
||||
FROM (SELECT *, ${cashInTx.TRANSACTION_STATES} AS txStatus FROM cash_in_txs) AS txs
|
||||
LEFT OUTER JOIN customers c ON txs.customer_id = c.id
|
||||
INNER JOIN devices d ON txs.device_id = d.device_id
|
||||
LEFT JOIN devices d ON txs.device_id = d.device_id
|
||||
WHERE txs.created >= $2 AND txs.created <= $3 ${
|
||||
id !== null ? `AND txs.device_id = $6` : ``
|
||||
}
|
||||
|
|
@ -87,7 +87,7 @@ function batch (
|
|||
INNER JOIN cash_out_actions actions ON txs.id = actions.tx_id
|
||||
AND actions.action = 'provisionAddress'
|
||||
LEFT OUTER JOIN customers c ON txs.customer_id = c.id
|
||||
INNER JOIN devices d ON txs.device_id = d.device_id
|
||||
LEFT JOIN devices d ON txs.device_id = d.device_id
|
||||
WHERE txs.created >= $2 AND txs.created <= $3 ${
|
||||
id !== null ? `AND txs.device_id = $6` : ``
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue