All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.killbill.billing.payment.dao.TransactionSqlDao.sql.stg Maven / Gradle / Ivy

There is a newer version: 0.24.11
Show newest version
group TransactionSqlDao: EntitySqlDao;

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
, processed_amount = :processedAmount
, processed_currency = :processedCurrency
, gateway_error_code = :gatewayErrorCode
, gateway_error_msg = :gatewayErrorMsg
, updated_by = :updatedBy
, updated_date = :createdDate
where id = :id

;
>>

getByPaymentId() ::= <<
select 
from 
where payment_id = :paymentId


;
>>


/* Does not include AND_CHECK_TENANT() since this is a global operation */
getByTransactionStatusPriorDate() ::= <<
select 
from 
where transaction_status = :transactionStatus
and created_date \< :beforeCreatedDate

;
>>


failOldPendingTransactions(ids) ::= <<
update 
set transaction_status = :newTransactionStatus
, updated_by = :updatedBy
, updated_date = :createdDate
where  in (}; separator="," >)
;
>>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy