|  |  | 
 |  |  |     where id = #{id,jdbcType=BIGINT} | 
 |  |  |   </delete> | 
 |  |  |  | 
 |  |  |   <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoSe.SeReversal"> | 
 |  |  |   <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeReversal"> | 
 |  |  |     <!--@mbg.generated--> | 
 |  |  |     insert into se_reversal (id, cardId, clientId, cardBalance, systemBalance, remarks, `operator`, operateDt) | 
 |  |  |     values (#{id,jdbcType=BIGINT}, | 
 |  |  |             #{cardid,jdbcType=BIGINT}, | 
 |  |  |             #{clientid,jdbcType=BIGINT}, | 
 |  |  |             #{cardbalance,jdbcType=FLOAT}, | 
 |  |  |             #{systembalance,jdbcType=FLOAT}, | 
 |  |  |             #{remarks,jdbcType=VARCHAR}, | 
 |  |  |             #{operator,jdbcType=BIGINT}, | 
 |  |  |             #{operatedt,jdbcType=TIMESTAMP}) | 
 |  |  |     insert into se_reversal (id, cardId, clientId, cardBalance, | 
 |  |  |       systemBalance, remarks, `operator`,  | 
 |  |  |       operateDt) | 
 |  |  |     values (#{id,jdbcType=BIGINT}, #{cardid,jdbcType=BIGINT}, #{clientid,jdbcType=BIGINT}, #{cardbalance,jdbcType=FLOAT}, | 
 |  |  |       #{systembalance,jdbcType=FLOAT}, #{remarks,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT},  | 
 |  |  |       #{operatedt,jdbcType=TIMESTAMP}) | 
 |  |  |   </insert> | 
 |  |  |  | 
 |  |  | <!--  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeReversal" useGeneratedKeys="true">--> | 
 |  |  | <!--    <!–@mbg.generated–>--> | 
 |  |  | <!--    insert into se_reversal (cardId, clientId, cardBalance, --> | 
 |  |  | <!--      systemBalance, remarks, `operator`, --> | 
 |  |  | <!--      operateDt)--> | 
 |  |  | <!--    values (#{cardid,jdbcType=BIGINT}, #{clientid,jdbcType=BIGINT}, #{cardbalance,jdbcType=FLOAT}, --> | 
 |  |  | <!--      #{systembalance,jdbcType=FLOAT}, #{remarks,jdbcType=VARCHAR}, #{operator,jdbcType=BIGINT}, --> | 
 |  |  | <!--      #{operatedt,jdbcType=TIMESTAMP})--> | 
 |  |  | <!--  </insert>--> | 
 |  |  |  | 
 |  |  |   <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeReversal" useGeneratedKeys="true"> | 
 |  |  |     <!--@mbg.generated--> | 
 |  |  | 
 |  |  |       operateDt = #{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_client_card card | 
 |  |  |     INNER JOIN se_reversal rev ON rev.cardId = card.id | 
 |  |  |     INNER JOIN ba_client cli ON    card.clientId = cli.id | 
 |  |  |         COUNT(*) AS recordCount | 
 |  |  |     FROM se_reversal rev | 
 |  |  |     INNER JOIN se_client_card card ON rev.cardId = card.id | 
 |  |  |     INNER JOIN se_client cli ON rev.clientId = cli.id | 
 |  |  |     , (SELECT @i:=0) AS itable | 
 |  |  |     <where> | 
 |  |  |       <if test = "clientName != null and clientName !=''"> | 
 |  |  |         AND cli.name like CONCAT('%',#{clientName},'%') | 
 |  |  |       </if> | 
 |  |  |  | 
 |  |  |       <if test = "cardAddr != null and cardAddr !=''"> | 
 |  |  |         AND card.cardAddr like CONCAT('%',#{cardAddr},'%') | 
 |  |  |       <if test = "cardNum != null and cardNum !=''"> | 
 |  |  |         AND card.cardNum like CONCAT('%',#{cardNum},'%') | 
 |  |  |       </if> | 
 |  |  |  | 
 |  |  |       <if test = "reversallTimeStart != null and reversalTimeStop != null"> | 
 |  |  |         AND card.unlockDt BETWEEN #{reversallTimeStart} AND #{reversalTimeStop} | 
 |  |  |       <if test = "reversalTimeStart != null and reversalTimeStop != null"> | 
 |  |  |         AND rev.operateDt BETWEEN #{reversalTimeStart} AND #{reversalTimeStop} | 
 |  |  |       </if> | 
 |  |  |     </where> | 
 |  |  |   </select> | 
 |  |  | 
 |  |  |   <!--根据指定的条件获取冲正记录--> | 
 |  |  |   <select id="getReversals" resultType="com.dy.pipIrrGlobal.voSe.VoReversal"> | 
 |  |  |     SELECT | 
 |  |  |         (@i:=@i+1) AS id, | 
 |  |  |         cli.`name` AS clientName, | 
 |  |  |         cli.id AS clientId, | 
 |  |  |         card.cardAddr, | 
 |  |  |         rev.cardBalance, | 
 |  |  |         (SELECT `name` FROM ba_user WHERE id =  rev.operator) AS operator, | 
 |  |  |         rev.operateDt | 
 |  |  |       (@i:=@i+1) AS id, | 
 |  |  |       cli.`name` AS clientName, | 
 |  |  |       cli.clientNum, | 
 |  |  |       card.cardNum, | 
 |  |  |       rev.cardBalance, | 
 |  |  |       (SELECT `name` FROM ba_user WHERE id =  rev.operator) AS operator, | 
 |  |  |       rev.operateDt | 
 |  |  |     FROM se_reversal rev | 
 |  |  |         INNER JOIN se_client_card card ON rev.cardId = card.id | 
 |  |  |         INNER JOIN ba_client cli ON rev.clientId = cli.id | 
 |  |  |         , (SELECT @i:=0) AS itable | 
 |  |  |       INNER JOIN se_client_card card ON rev.cardId = card.id | 
 |  |  |       INNER JOIN se_client cli ON rev.clientId = cli.id | 
 |  |  |       , (SELECT @i:=0) AS itable | 
 |  |  |     <where> | 
 |  |  |       <if test = "clientName != null and clientName !=''"> | 
 |  |  |         AND cli.name like CONCAT('%',#{clientName},'%') | 
 |  |  |       </if> | 
 |  |  |  | 
 |  |  |       <if test = "cardAddr != null and cardAddr !=''"> | 
 |  |  |         AND card.cardAddr like CONCAT('%',#{cardAddr},'%') | 
 |  |  |       <if test = "cardNum != null and cardNum !=''"> | 
 |  |  |         AND card.cardNum like CONCAT('%',#{cardNum},'%') | 
 |  |  |       </if> | 
 |  |  |  | 
 |  |  |       <if test = "reversalTimeStart != null and reversalTimeStop != null"> | 
 |  |  |         AND rev.operateDt BETWEEN #{reversalTimeStart} AND #{reversalTimeStop} | 
 |  |  |       </if> | 
 |  |  |     </where> | 
 |  |  |  | 
 |  |  |     <if test="pageCurr != null and pageSize != null"> | 
 |  |  |       LIMIT ${pageCurr}, ${pageSize} | 
 |  |  |     </if> | 
 |  |  |     ORDER BY rev.operateDt DESC | 
 |  |  |     <trim prefix="limit " > | 
 |  |  |       <if test="start != null and count != null"> | 
 |  |  |         #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER} | 
 |  |  |       </if> | 
 |  |  |     </trim> | 
 |  |  |   </select> | 
 |  |  | </mapper> |