Java Code Examples for com.jfinal.plugin.activerecord.Db#queryBigDecimal()
The following examples show how to use
com.jfinal.plugin.activerecord.Db#queryBigDecimal() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: UserAmountStatementServiceProvider.java From jpress with GNU Lesser General Public License v3.0 | 5 votes |
@Override public BigDecimal queryPayAmount(Long userId) { return Db.queryBigDecimal("select sum(change_amount) from user_amount_statement where user_id = ? and change_amount < 0 and action != ? and created > ?" , userId , UserAmountStatement.ACTION_PAYOUT , DateUtils.truncate(new Date(), Calendar.MONTH)); }
Example 2
Source File: UserAmountStatementServiceProvider.java From jpress with GNU Lesser General Public License v3.0 | 5 votes |
@Override public BigDecimal queryPayoutAmount(Long userId) { return Db.queryBigDecimal("select sum(change_amount) from user_amount_statement where user_id = ? and change_amount < 0 and action = ? and created > ?" , userId , UserAmountStatement.ACTION_PAYOUT , DateUtils.truncate(new Date(), Calendar.MONTH)); }
Example 3
Source File: UserAmountStatementServiceProvider.java From jpress with GNU Lesser General Public License v3.0 | 4 votes |
@Override public BigDecimal queryIncomeAmount(Long userId) { return Db.queryBigDecimal("select sum(change_amount) from user_amount_statement where user_id = ? and change_amount > 0 and created > ? " , userId , DateUtils.truncate(new Date(), Calendar.MONTH)); }