org.killbill.billing.payment.dao.TransactionSqlDao.sql.stg Maven / Gradle / Ivy
import "org/killbill/billing/util/entity/dao/EntitySqlDao.sql.stg"
tableName() ::= "payment_transactions"
historyTableName() ::= "payment_transaction_history"
defaultOrderBy(prefix) ::= <<
order by effective_date ASC, ASC
>>
tableFields(prefix) ::= <<
attempt_id
, transaction_external_key
, transaction_type
, effective_date
, transaction_status
, amount
, currency
, processed_amount
, processed_currency
, payment_id
, gateway_error_code
, gateway_error_msg
, created_by
, created_date
, updated_by
, updated_date
>>
tableValues() ::= <<
:attemptId
, :transactionExternalKey
, :transactionType
, :effectiveDate
, :transactionStatus
, :amount
, :currency
, :processedAmount
, :processedCurrency
, :paymentId
, :gatewayErrorCode
, :gatewayErrorMsg
, :createdBy
, :createdDate
, :updatedBy
, :updatedDate
>>
getPaymentTransactionsByExternalKey() ::= <<
select
from
where transaction_external_key = :transactionExternalKey
;
>>
updateTransactionStatus() ::= <<
update
set transaction_status = :transactionStatus
, attempt_id = :attemptId
, processed_amount = :processedAmount
, processed_currency = :processedCurrency
, gateway_error_code = :gatewayErrorCode
, gateway_error_msg = :gatewayErrorMsg
, updated_by = :updatedBy
, updated_date = :updatedDate
where id = :id
;
>>
getByPaymentId() ::= <<
select
from
where payment_id = :paymentId
;
>>
/* Does not include AND_CHECK_TENANT() since this is a global operation */
getByTransactionStatusPriorDateAcrossTenants(statuses, ordering) ::= <<
select
from
where
created_date >= :createdAfterDate
and created_date \< :createdBeforeDate
and transaction_status in ()
order by
limit :rowCount offset :offset
;
>>
getCountByTransactionStatusPriorDateAcrossTenants(statuses) ::= <<
select
count(1) as count
from
where
created_date >= :createdAfterDate
and created_date \< :createdBeforeDate
and transaction_status in ()
;
>>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy