| | |
| | | </select> |
| | | |
| | | <!--根据指定条件获取开卡记录--> |
| | | <select id="getActiveCards" resultType="com.dy.pipIrrGlobal.voSe.VoActiveCardNew"> |
| | | <select id="getActiveCards" resultType="com.dy.pipIrrGlobal.voSe.VoActiveCard"> |
| | | SELECT |
| | | CAST(ope.id AS char) AS id , |
| | | cli.name AS clientName, |
| | |
| | | </trim> |
| | | </select> |
| | | |
| | | <!--根据指定条件获取通用操作记录数量--> |
| | | <select id="getCommonOperationRecordCount" parameterType="java.util.Map" resultType="java.lang.Long"> |
| | | select |
| | | COUNT(*) AS recordCount |
| | | FROM se_card_operate ope |
| | | INNER JOIN se_client cli ON ope.client_id = cli.id |
| | | INNER JOIN se_client_card card ON ope.card_id = card.id |
| | | INNER JOIN ba_user us ON ope.operator = us.id |
| | | <where> |
| | | <if test = "operateType != null and operateType > 0"> |
| | | AND ope.operate_type = ${operateType} |
| | | </if> |
| | | |
| | | <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 = "timeStart != null and timeStop != null"> |
| | | AND ope.operate_dt BETWEEN #{timeStart} AND #{timeStop} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!--根据指定条件获取通用操作记录--> |
| | | <select id="getCommonOperations" resultType="com.dy.pipIrrGlobal.voSe.VoOperate"> |
| | | SELECT |
| | | cli.name AS clientName, |
| | | cli.clientNum, |
| | | CAST(card.cardNum AS char) AS cardNum, |
| | | us.name AS operator, |
| | | ope.operate_dt AS operateDt, |
| | | IFNULL(ope.trade_amount,0) AS refund, |
| | | (CASE |
| | | WHEN ope.payment_id = 1 THEN "现金" |
| | | END) AS refundTypeName, |
| | | card.money, |
| | | IFNULL(ope.system_balance,0) AS systemBalance |
| | | FROM se_card_operate ope |
| | | INNER JOIN se_client cli ON ope.client_id = cli.id |
| | | INNER JOIN se_client_card card ON ope.card_id = card.id |
| | | INNER JOIN ba_user us ON ope.operator = us.id |
| | | <where> |
| | | <if test = "operateType != null and operateType > 0"> |
| | | AND ope.operate_type = ${operateType} |
| | | </if> |
| | | |
| | | <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 = "timeStart != null and timeStop != null"> |
| | | AND ope.operate_dt BETWEEN #{timeStart} AND #{timeStop} |
| | | </if> |
| | | </where> |
| | | ORDER BY ope.operate_dt DESC |
| | | <trim prefix="limit " > |
| | | <if test="start != null and count != null"> |
| | | #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER} |
| | | </if> |
| | | </trim> |
| | | </select> |
| | | |
| | | <!--根据指定条件获取收据列表数--> |
| | | <select id="getReceiptsRecordCount" parameterType="java.util.Map" resultType="java.lang.Long"> |
| | | SELECT |