| | |
| | | LEFT JOIN se_client_card card ON card.id = ope.card_id |
| | | LEFT JOIN se_payment_method pay ON pay.id = ope.payment_id |
| | | LEFT JOIN ba_user user ON user.id = ope.operator |
| | | WHERE ope.operate_valid = 2 AND ope.operate_type in (1,2,3) AND cardNum = #{cardNum,jdbcType=BIGINT} |
| | | <!-- SELECT *--> |
| | | <!-- FROM v_operate--> |
| | | <!-- WHERE cardNum = #{cardNum,jdbcType=BIGINT}--> |
| | | <!-- WHERE ope.operate_valid = 2 AND ope.operate_type in (1,2,3) AND cardNum = #{cardNum,jdbcType=BIGINT}--> |
| | | <where> |
| | | AND ope.operate_valid = 2 |
| | | AND ope.operate_type in (1,2,3) |
| | | <if test="cardNum != null and cardNum != ''"> |
| | | AND card.cardNum = #{cardNum} |
| | | </if> |
| | | |
| | | <if test="cardAddr != null and cardAddr != ''"> |
| | | AND card.cardAddr = #{cardAddr} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!--根据水卡编号获取余额--> |
| | | <select id="getMoneyByCardNum" resultType="java.lang.Float"> |
| | | SELECT money |
| | | FROM se_client_card |
| | | WHERE cardNum = #{cardNum,jdbcType=BIGINT} |
| | | <!-- WHERE cardNum = #{cardNum,jdbcType=BIGINT}--> |
| | | <where> |
| | | <if test="cardNum != null and cardNum != ''"> |
| | | AND cardNum = #{cardNum} |
| | | </if> |
| | | |
| | | <if test="cardAddr != null and cardAddr != ''"> |
| | | AND cardAddr = #{cardAddr} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!--根据水卡编号获取充值总额--> |
| | |
| | | SELECT SUM(his.amount) AS amount |
| | | FROM se_recharge_history his |
| | | INNER JOIN se_client_card card ON his.cardId = card.id |
| | | WHERE card.cardNum = #{cardNum,jdbcType=BIGINT} |
| | | <!-- WHERE card.cardNum = #{cardNum,jdbcType=BIGINT}--> |
| | | <where> |
| | | <if test="cardNum != null and cardNum != ''"> |
| | | AND card.cardNum = #{cardNum} |
| | | </if> |
| | | |
| | | <if test="cardAddr != null and cardAddr != ''"> |
| | | AND card.cardAddr = #{cardAddr} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!--根据水卡编号获取卡片状态:1-开卡,2-补卡,3-充值,4-挂失,5-注销,6-解锁,7-冲正,8-消费--> |