From ab37d7d33e2484ee97a602f348ab475101389149 Mon Sep 17 00:00:00 2001
From: Administrator <zhubaomin>
Date: 星期三, 31 一月 2024 21:19:18 +0800
Subject: [PATCH] 2024-01-31 朱宝民 电子钱包4个查询接口

---
 pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeWalletRechargeMapper.xml |   53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 53 insertions(+), 0 deletions(-)

diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeWalletRechargeMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeWalletRechargeMapper.xml
index 44fb44a..cb9d41c 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeWalletRechargeMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeWalletRechargeMapper.xml
@@ -123,4 +123,57 @@
       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>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0