Class TransactionManager
java.lang.Object
ru.bitel.bgbilling.kernel.base.server.logger.BGLogger
ru.bitel.common.dao.AbstarctDaoConstant
ru.bitel.common.dao.AbstractDao<B>
ru.bitel.common.dao.AbstractIdDao<B>
ru.bitel.bgbilling.server.bean.AbstractTransactionManager<Transaction>
ru.bitel.bgbilling.modules.yoomoney.server.bean.TransactionManager
- All Implemented Interfaces:
AutoCloseable
-
Nested Class Summary
Nested classes/interfaces inherited from class ru.bitel.common.dao.AbstractDao
ru.bitel.common.dao.AbstractDao.ResultSetIterator -
Field Summary
Fields inherited from class ru.bitel.bgbilling.server.bean.AbstractTransactionManager
moduleSetupFields inherited from class ru.bitel.common.dao.AbstractDao
cacheFilter, cacheJoin, cacheOrderBy, cachePaged, cachePS, cacheWhat, con, getByIdPS, moduleId, orderByPattern, tableNameFields inherited from class ru.bitel.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 cid) Возвращает год, с которого были платежи для этого договора.protected Transactionorg.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, getLogger, getParameter, getParamString, getParamString, getParamString, psStatus, queryStatus, searchTransaction, setParameterMethods inherited from class ru.bitel.common.dao.AbstractIdDao
delete, executeUpdate, get, getAndDelete, getAndUpdate, optMethods inherited from class ru.bitel.common.dao.AbstractDao
close, delete, deleteImpl, eq, get, getById, getImpl, getListFromRS, getPeriod, getQueryById, getSQLOrder, getTableName, list, list, listImpl, listImpl, listImplPS, listImplPS, ormFromResultSet, ormUpdateImpl, ormUpdateImpl, ormUpdateImpl, ormUpdateImpl, processException, setStatementParam, updateMethods inherited from class ru.bitel.common.dao.AbstarctDaoConstant
getSQLOrderMethods inherited from class ru.bitel.bgbilling.kernel.base.server.logger.BGLogger
error, error, error, 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
public Transaction getTransactionByPaymentId(int paymentId) throws ru.bitel.bgbilling.common.BGException - Throws:
ru.bitel.bgbilling.common.BGException
-
getFirstYear
public int getFirstYear(int cid) throws ru.bitel.bgbilling.common.BGException Возвращает год, с которого были платежи для этого договора. Если не было ничего, то возвращает текущий.- Parameters:
cid- контракт_ид- Returns:
- четырёхзначное число - год
- Throws:
ru.bitel.bgbilling.common.BGException
-
deleteTransaction
public void deleteTransaction(int id) throws ru.bitel.bgbilling.common.BGException Удаление платежа-транзакции из лога. Не используется, кажется, пока.- Parameters:
id- ид платежа в таблице yoomoney_transactions_$mid.- Throws:
ru.bitel.bgbilling.common.BGException
-
carryOutPayment
@Deprecated public void carryOutPayment(Transaction transaction) throws ru.bitel.bgbilling.common.BGException Deprecated.Проведение платежа и занесение его в платежи договора.- Parameters:
transaction- транзакция, проверенная на нужность добавления- Throws:
ru.bitel.bgbilling.common.BGException
-
formatComment
Форматируем камент из шаблона. Комментарий расхода для нашего биллинга.- Parameters:
pattern- шаблонtransaction- платёж-транзакция- Returns:
- строка-камент
-
getFromRS
protected Transaction getFromRS(ResultSet rs) throws SQLException, ru.bitel.bgbilling.common.BGException - Specified by:
getFromRSin classru.bitel.common.dao.AbstractDao<Transaction>- Throws:
SQLExceptionru.bitel.bgbilling.common.BGException
-
updateImpl
- Specified by:
updateImplin classru.bitel.common.dao.AbstractDao<Transaction>- Throws:
ru.bitel.bgbilling.common.BGException
-
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)
-