| | |
| | | |
| | | <select id="selectTotalAmount" resultType="java.math.BigDecimal"> |
| | | select IFNULL(sum(IFNULL(amount,0)),0) from mall_order_info |
| | | where member_id=#{memberId} and status <![CDATA[>= ]]> 4 |
| | | where member_id=#{memberId} and status = 4 |
| | | </select> |
| | | |
| | | <select id="selectTotalAmountForDate" resultType="java.math.BigDecimal"> |
| | |
| | | count(a.id) |
| | | from mall_order_info a |
| | | where |
| | | a.status <![CDATA[>= ]]> 4 |
| | | a.status = 4 |
| | | and a.member_id = #{memberId} |
| | | <if test="createdTime != null"> |
| | | and date_format(a.CREATED_TIME, '%Y-%m-%d') = #{createdTime} |
| | |
| | | ifnull(sum(a.subsidy_amount),0) |
| | | from mall_order_info a |
| | | where |
| | | a.status <![CDATA[>= ]]> 4 |
| | | a.status = 4 |
| | | and a.member_id = #{memberId} |
| | | <if test="createdTime != null"> |
| | | and date_format(a.CREATED_TIME, '%Y-%m-%d') = #{createdTime} |