|  |  |  | 
|---|
|  |  |  | recharge_time = #{rechargeTime,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_wallet_recharge rec | 
|---|
|  |  |  | INNER JOIN se_client cli ON rec.client_id = cli.id | 
|---|
|  |  |  | <where> | 
|---|
|  |  |  | <if test = "walletId != null and walletId > 0"> | 
|---|
|  |  |  | AND rec.wallet_id = ${walletId} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <if test = "clientName != null and clientName !=''"> | 
|---|
|  |  |  | AND cli.name like CONCAT('%',#{clientName},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <if test = "timeStart != null and timeStop != null"> | 
|---|
|  |  |  | AND rec.recharge_time BETWEEN #{timeStart} AND #{timeStop} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </where> | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!--根据指定条件获取电子钱包充值记录--> | 
|---|
|  |  |  | <select id="getWalletRecharges" resultType="com.dy.pipIrrGlobal.voSe.VoWalletRecharge"> | 
|---|
|  |  |  | SELECT | 
|---|
|  |  |  | cli.`name`, | 
|---|
|  |  |  | cli.clientNum, | 
|---|
|  |  |  | cli.phone, | 
|---|
|  |  |  | rec.amount, | 
|---|
|  |  |  | rec.after_recharge AS afterRecharge, | 
|---|
|  |  |  | rec.recharge_time AS rechargeTime | 
|---|
|  |  |  | FROM se_wallet_recharge rec | 
|---|
|  |  |  | INNER JOIN se_client cli ON rec.client_id = cli.id | 
|---|
|  |  |  | <where> | 
|---|
|  |  |  | <if test = "walletId != null and walletId > 0"> | 
|---|
|  |  |  | AND rec.wallet_id = ${walletId} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <if test = "clientName != null and clientName !=''"> | 
|---|
|  |  |  | AND cli.name like CONCAT('%',#{clientName},'%') | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <if test = "timeStart != null and timeStop != null"> | 
|---|
|  |  |  | AND rec.recharge_time BETWEEN #{timeStart} AND #{timeStop} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </where> | 
|---|
|  |  |  | ORDER BY rec.recharge_time 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="getRechargeSum" resultType="java.lang.Double"> | 
|---|
|  |  |  | SELECT | 
|---|
|  |  |  | SUM(amount) AS tradeAmount | 
|---|
|  |  |  | FROM se_wallet_recharge | 
|---|
|  |  |  | <where> | 
|---|
|  |  |  | <if test = "tradeDate != null and tradeDate !=''"> | 
|---|
|  |  |  | AND Date(recharge_time) = #{tradeDate} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </where> | 
|---|
|  |  |  | GROUP BY Date(recharge_time) | 
|---|
|  |  |  | </select> | 
|---|
|  |  |  | </mapper> | 
|---|