| | |
| | | LIMIT ${pageCurr}, ${pageSize} |
| | | </if> |
| | | </select> |
| | | |
| | | <!--根据指定条件获取补卡记录数量--> |
| | | <select id="getReissueCardRecordCount" 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 = 4 |
| | | <if test = "clientName != null and clientName !=''"> |
| | | AND cli.name like CONCAT('%',#{clientName},'%') |
| | | </if> |
| | | |
| | | <if test = "cardNum != null and cardNum !=''"> |
| | | AND card.cardNum like CONCAT('%',#{cardNum},'%') |
| | | </if> |
| | | |
| | | <if test = "activeTimeStart != null and activeTimeStop != null"> |
| | | AND ope.operate_dt BETWEEN #{reissueCardTimeStart} AND #{reissueCardTimeStop} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!--根据指定条件获取补卡记录--> |
| | | <select id="getReissueCards" resultType="com.dy.pipIrrGlobal.voSe.VoReissueCard"> |
| | | SELECT |
| | | CAST(ope.id AS char) AS id , |
| | | cli.name AS clientName, |
| | | cli.clientNum AS clientNum, |
| | | card.cardNum AS cardNum, |
| | | ope.card_cost AS cardCost, |
| | | IFNULL(ope.no_trade_amount,0) AS reissueAmount, |
| | | (SELECT `name` FROM ba_user WHERE id = ope.operator) AS operator, |
| | | ope.operate_dt AS operateDt |
| | | 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 = 4 |
| | | <if test = "clientName != null and clientName !=''"> |
| | | AND cli.name like CONCAT('%',#{clientName},'%') |
| | | </if> |
| | | |
| | | <if test = "cardNum != null and cardNum !=''"> |
| | | AND card.cardNum like CONCAT('%',#{cardNum},'%') |
| | | </if> |
| | | |
| | | <if test = "activeTimeStart != null and activeTimeStop != null"> |
| | | AND ope.operate_dt BETWEEN #{reissueCardTimeStart} AND #{reissueCardTimeStop} |
| | | </if> |
| | | </where> |
| | | ORDER BY ope.operate_dt DESC |
| | | <if test="pageCurr != null and pageSize != null"> |
| | | LIMIT ${pageCurr}, ${pageSize} |
| | | </if> |
| | | </select> |
| | | </mapper> |