Class TransactionManager
java.lang.Object
ru.bitel.bgbilling.kernel.base.server.logger.BGLogger
ru.bitel.bgbilling.common.dao.AbstarctDaoConstant
ru.bitel.bgbilling.common.dao.AbstractDao<Transaction>
ru.bitel.bgbilling.common.dao.AbstractIdDao<Transaction>
ru.bitel.bgbilling.server.bean.AbstractTransactionManager<Transaction>
ru.bitel.bgbilling.modules.yoomoney.server.bean.TransactionManager
-
Field Summary
Fields inherited from class ru.bitel.bgbilling.server.bean.AbstractTransactionManager
moduleSetupFields inherited from class ru.bitel.bgbilling.common.dao.AbstractDao
con, moduleId, orderByPattern, tableNameFields inherited from class ru.bitel.bgbilling.common.dao.AbstarctDaoConstant
ERROR, fields, SQL_ALL, SQL_AND, SQL_CALC_FOUND_ROWS, SQL_DELETE, SQL_DISTINCT, SQL_EQ, SQL_EQCS, SQL_FROM, SQL_GROUP, SQL_IN, SQL_INSERT, SQL_JOIN, SQL_LEFT_JOIN, SQL_LIMIT, SQL_NOT_IN, SQL_ON, SQL_ON_DUPLICATE_KEY_UPDATE, SQL_ORDER, SQL_SELECT, SQL_SET, SQL_UPDATE, SQL_VALUES, SQL_WHERE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcancelAutopayment(int contractId) voidcarryOutPayment(Transaction transaction) Deprecated.protected voidcheckAutopayment(int contractId, org.json.JSONObject resultJsonObject) voiddeleteTransaction(int id) Удаление платежа-транзакции из лога.voiddoCheckRequest(String objectId) doPaymentRequest(String data, String idempotenceKey) voiddoTransaction(String yoomoneyId, String status, BigDecimal sum, org.json.JSONObject resultJsonObject) formatComment(String pattern, Transaction transaction) Форматируем камент из шаблона.getCheckIds(int intervalMinute) intgetFirstYear(int contractId) Возвращает год, с которого были платежи для этого договора.protected Transactionprotected <T extends BGAbstractTransaction>
StringgetPaymentData(T transaction) org.json.JSONObjectgetPaymentRequestJSON(BigDecimal sum, int contractId, String contractTitle, String autoId, YoomoneyPaymentType paymentType) getTransactionByPaymentId(int paymentId) getTransactionByYoomoneyId(String yoomoneyId) getTransactionForInvoice(long invoiceId) Возвращает транзакцию по ид_транзакции платёжной системы.voidsearchTransactionList(SearchResult<Transaction> searchResult, SearchParam searchParam) protected voidsetConnectionTimeout(HttpsURLConnection connection) protected voidupdateImpl(Transaction transaction) Methods inherited from class ru.bitel.bgbilling.server.bean.AbstractTransactionManager
doConnection, doConnection, getParameter, getParamString, getParamString, getParamString, psStatus, queryStatus, searchTransaction, setParameterMethods inherited from class ru.bitel.bgbilling.common.dao.AbstractIdDao
delete, executeUpdate, get, getAndDelete, getAndUpdate, opt, prepareStatement, sqlCommand, sqlCommandAndTable, sqlQuery, sqlWhereIdMethods inherited from class ru.bitel.bgbilling.common.dao.AbstractDao
delete, deleteImpl, eq, get, getById, getImpl, getListFromRS, getPeriod, getQueryById, getSQLOrder, getTableName, list, list, listImpl, listImpl, listImplPS, listImplPS, ormFromResultSet, ormUpdateImpl, ormUpdateImpl, ormUpdateImpl, ormUpdateImpl, psSetPeriod, queryPeriod, setStatementParam, updateMethods inherited from class ru.bitel.bgbilling.common.dao.AbstarctDaoConstant
getSQLOrder, sqlLimitMethods inherited from class ru.bitel.bgbilling.kernel.base.server.logger.BGLogger
error, error, error, getLogger, logError, logError, warn
-
Constructor Details
-
TransactionManager
-
-
Method Details
-
searchTransactionList
public void searchTransactionList(SearchResult<Transaction> searchResult, SearchParam searchParam) throws ru.bitel.bgbilling.common.BGException - Throws:
ru.bitel.bgbilling.common.BGException
-
getCheckIds
- Throws:
ru.bitel.bgbilling.common.BGException
-
getTransactionForInvoice
public Transaction getTransactionForInvoice(long invoiceId) throws ru.bitel.bgbilling.common.BGException Возвращает транзакцию по ид_транзакции платёжной системы. Используется в экзекутере при проверке есть ли уже платёж с такой транзакцией у нас в БД, ибо может быть повторный запрос.- Parameters:
invoiceId- одноимённый параметр.- Returns:
- объект транзакция.
- Throws:
ru.bitel.bgbilling.common.BGException
-
getTransactionByYoomoneyId
public Transaction getTransactionByYoomoneyId(String yoomoneyId) throws ru.bitel.bgbilling.common.BGException - Parameters:
yoomoneyId- - код( например 22e12f66-000f-5000-8000-18db351245c7 )- Returns:
- транзакция
- Throws:
ru.bitel.bgbilling.common.BGException
-
getTransactionByPaymentId
- Throws:
SQLException
-
getFirstYear
Возвращает год, с которого были платежи для этого договора. Если не было ничего, то возвращает текущий.- Parameters:
contractId- контракт_ид- Returns:
- четырёхзначное число - год
- Throws:
ru.bitel.bgbilling.common.BGExceptionSQLException
-
deleteTransaction
Удаление платежа-транзакции из лога. Не используется, кажется, пока.- Parameters:
id- ид платежа в таблице yoomoney_transactions_$mid.- Throws:
ru.bitel.bgbilling.common.BGExceptionSQLException
-
carryOutPayment
Deprecated.Проведение платежа и занесение его в платежи договора.- Parameters:
transaction- транзакция, проверенная на нужность добавления- Throws:
Exception
-
formatComment
Форматируем камент из шаблона. Комментарий расхода для нашего биллинга.- Parameters:
pattern- шаблонtransaction- платёж-транзакция- Returns:
- строка-камент
-
getFromRS
- Specified by:
getFromRSin classru.bitel.bgbilling.common.dao.AbstractDao<Transaction>- Throws:
SQLException
-
updateImpl
- Specified by:
updateImplin classru.bitel.bgbilling.common.dao.AbstractDao<Transaction>- Throws:
SQLException
-
setConnectionTimeout
- Overrides:
setConnectionTimeoutin classAbstractTransactionManager<Transaction>
-
getPaymentRequestJSON
public org.json.JSONObject getPaymentRequestJSON(BigDecimal sum, int contractId, String contractTitle, String autoId, YoomoneyPaymentType paymentType) throws ru.bitel.bgbilling.common.BGException - Throws:
ru.bitel.bgbilling.common.BGException
-
doPaymentRequest
-
doCheckRequest
-
doTransaction
public void doTransaction(String yoomoneyId, String status, BigDecimal sum, org.json.JSONObject resultJsonObject) -
checkAutopayment
protected void checkAutopayment(int contractId, org.json.JSONObject resultJsonObject) -
cancelAutopayment
protected void cancelAutopayment(int contractId) -
getPaymentData
- Overrides:
getPaymentDatain classAbstractTransactionManager<Transaction>
-