| | |
| | | operate_dt = #{operateDt,jdbcType=TIMESTAMP} |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | |
| | | <!--根据指定条件获取充值记录数量--> |
| | | <select id="getRecordCount" parameterType="java.util.Map" resultType="java.lang.Long"> |
| | | select |
| | | COUNT(*) AS recordCount |
| | | FROM se_card_operate ope |
| | | INNER JOIN se_client_card card ON ope.card_id = card.id |
| | | INNER JOIN se_client cli ON ope.client_id = cli.id |
| | | <where> |
| | | AND ope.operate_type = 2 |
| | | <if test = "clientName != null and clientName !=''"> |
| | | AND cli.name like CONCAT('%',#{clientName},'%') |
| | | </if> |
| | | |
| | | <if test = "clientNum != null and clientNum > 0"> |
| | | AND cli.clientNum like CONCAT('%',#{clientNum},'%') |
| | | </if> |
| | | |
| | | <if test = "cardNum != null and cardNum !=''"> |
| | | AND card.cardNum like CONCAT('%',#{cardNum},'%') |
| | | </if> |
| | | |
| | | <if test = "paymentId != null and paymentId > 0"> |
| | | AND ope.payment_id = ${paymentId} |
| | | </if> |
| | | |
| | | <if test = "rechargeTimeStart != null and rechargeTimeStop != null"> |
| | | AND ope.operate_dt BETWEEN #{rechargeTimeStart} AND #{rechargeTimeStop} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!--根据指定条件获取充值记录--> |
| | | <select id="getRecharges" resultType="com.dy.pipIrrGlobal.voSe.VoRecharge"> |
| | | SELECT |
| | | CAST(ope.id AS char) AS id , |
| | | cli.name AS clientName, |
| | | cli.clientNum, |
| | | card.cardNum, |
| | | ope.trade_amount AS amount, |
| | | (ope.money + ope.trade_amount) AS afterRecharge, |
| | | ope.payment_id, |
| | | ope.price, |
| | | (SELECT `name` FROM ba_user WHERE id = ope.operator) AS operator, |
| | | ope.operate_dt |
| | | FROM se_card_operate ope |
| | | INNER JOIN se_client_card card ON ope.card_id = card.id |
| | | INNER JOIN se_client cli ON ope.client_id = cli.id |
| | | <where> |
| | | AND ope.operate_type = 2 |
| | | <if test = "clientName != null and clientName !=''"> |
| | | AND cli.name like CONCAT('%',#{clientName},'%') |
| | | </if> |
| | | |
| | | <if test = "clientNum != null and clientNum > 0"> |
| | | AND cli.clientNum like CONCAT('%',#{clientNum},'%') |
| | | </if> |
| | | |
| | | <if test = "cardNum != null and cardNum !=''"> |
| | | AND card.cardNum like CONCAT('%',#{cardNum},'%') |
| | | </if> |
| | | |
| | | <if test = "paymentId != null and paymentId > 0"> |
| | | AND ope.payment_id = ${paymentId} |
| | | </if> |
| | | |
| | | <if test = "rechargeTimeStart != null and rechargeTimeStop != null"> |
| | | AND ope.operate_dt BETWEEN #{rechargeTimeStart} AND #{rechargeTimeStop} |
| | | </if> |
| | | </where> |
| | | ORDER BY ope.operate_dt DESC |
| | | <if test="pageCurr != null and pageSize != null"> |
| | | LIMIT ${pageCurr}, ${pageSize} |
| | | </if> |
| | | </select> |
| | | </mapper> |