From 8d76e801e612abb38123acc7edaccd24887a685b Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期五, 15 八月 2025 09:07:42 +0800
Subject: [PATCH] 根据韩月设计,去除参数实体类(Param)及相关逻辑代码,作物实体类的开始日期与结束日期属性改为月日型。

---
 pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeClientCardMapper.xml |   38 ++++++++++++++++++++++++++++++++------
 1 files changed, 32 insertions(+), 6 deletions(-)

diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeClientCardMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeClientCardMapper.xml
index 76c469e..ff87890 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeClientCardMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeClientCardMapper.xml
@@ -401,17 +401,34 @@
     LEFT JOIN se_client_card card ON card.id = ope.card_id
     LEFT JOIN se_payment_method pay ON pay.id = ope.payment_id
     LEFT JOIN ba_user user ON user.id = ope.operator
-    WHERE ope.operate_valid = 2 AND ope.operate_type in (1,2,3) AND cardNum = #{cardNum,jdbcType=BIGINT}
-    <!--        SELECT *-->
-    <!--        FROM v_operate-->
-    <!--        WHERE cardNum = #{cardNum,jdbcType=BIGINT}-->
+<!--    WHERE ope.operate_valid = 2 AND ope.operate_type in (1,2,3) AND cardNum = #{cardNum,jdbcType=BIGINT}-->
+    <where>
+      AND ope.operate_valid = 2
+      AND ope.operate_type in (1,2,3)
+      <if test="cardNum != null and cardNum != ''">
+        AND card.cardNum = #{cardNum}
+      </if>
+
+      <if test="cardAddr != null and cardAddr != ''">
+        AND card.cardAddr = #{cardAddr}
+      </if>
+    </where>
   </select>
 
   <!--鏍规嵁姘村崱缂栧彿鑾峰彇浣欓-->
   <select id="getMoneyByCardNum" resultType="java.lang.Float">
     SELECT money
     FROM se_client_card
-    WHERE cardNum = #{cardNum,jdbcType=BIGINT}
+<!--    WHERE cardNum = #{cardNum,jdbcType=BIGINT}-->
+    <where>
+      <if test="cardNum != null and cardNum != ''">
+        AND cardNum = #{cardNum}
+      </if>
+
+      <if test="cardAddr != null and cardAddr != ''">
+        AND cardAddr = #{cardAddr}
+      </if>
+    </where>
   </select>
 
   <!--鏍规嵁姘村崱缂栧彿鑾峰彇鍏呭�兼�婚-->
@@ -419,7 +436,16 @@
     SELECT SUM(his.amount) AS amount
     FROM se_recharge_history his
     INNER JOIN se_client_card card ON his.cardId = card.id
-    WHERE card.cardNum = #{cardNum,jdbcType=BIGINT}
+<!--    WHERE card.cardNum = #{cardNum,jdbcType=BIGINT}-->
+    <where>
+      <if test="cardNum != null and cardNum != ''">
+        AND card.cardNum = #{cardNum}
+      </if>
+
+      <if test="cardAddr != null and cardAddr != ''">
+        AND card.cardAddr = #{cardAddr}
+      </if>
+    </where>
   </select>
 
   <!--鏍规嵁姘村崱缂栧彿鑾峰彇鍗$墖鐘舵�侊細1-寮�鍗★紝2-琛ュ崱锛�3-鍏呭�硷紝4-鎸傚け锛�5-娉ㄩ攢锛�6-瑙i攣锛�7-鍐叉锛�8-娑堣垂-->

--
Gitblit v1.8.0