| | |
| | | |
| | | <select id="queryRechargeRecord" resultType="java.util.Map"> |
| | | SELECT |
| | | id as id, |
| | | category as category, |
| | | userId as userId, |
| | | `type` as `type`, |
| | | orderId as orderId, |
| | | orderType as orderType, |
| | | payType as payType, |
| | | amount as amount, |
| | | code as code, |
| | | `state` as state, |
| | | DATE_FORMAT(insertTime, '%Y-%m-%d %H:%i') as insertTime |
| | | id as id, |
| | | category as category, |
| | | userId as userId, |
| | | `type` as `type`, |
| | | orderId as orderId, |
| | | orderType as orderType, |
| | | payType as payType, |
| | | amount as amount, |
| | | code as code, |
| | | `state` as state, |
| | | DATE_FORMAT(insertTime, '%Y-%m-%d %H:%i') as insertTime |
| | | FROM t_payment_record |
| | | WHERE category = 2 AND userId = #{uid} AND `type` = 1 |
| | | ORDER BY insertTime DESC |
| | |
| | | </select> |
| | | |
| | | <select id="queryRechargeMoneySum" resultType="java.lang.Double"> |
| | | SELECT SUM(amount) |
| | | SELECT ifnull(SUM(amount), 0) |
| | | FROM t_payment_record |
| | | WHERE category = 2 AND userId = #{uid} AND `type` = 1 AND `state` = 2 |
| | | </select> |