| | |
| | | group by expense_type |
| | | </select> |
| | | |
| | | <select id="report1" resultType="java.math.BigDecimal"> |
| | | SELECT |
| | | sum(expense_money) account |
| | | FROM account_expense ai |
| | | where |
| | | expense_type=#{dictValue} |
| | | <if test="dateQueryDto.entryDateStart != null and dateQueryDto.entryDateStart != '' "> |
| | | AND expense_date >= DATE_FORMAT(#{dateQueryDto.entryDateStart},'%Y-%m-%d') |
| | | </if> |
| | | <if test="dateQueryDto.entryDateEnd != null and dateQueryDto.entryDateEnd != '' "> |
| | | AND expense_date <= DATE_FORMAT(#{dateQueryDto.entryDateEnd},'%Y-%m-%d') |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |