From 9357012ee7684579464a2d9b5b7c6859245ba283 Mon Sep 17 00:00:00 2001
From: wuzeyu <1223318623@qq.com>
Date: 星期五, 28 六月 2024 11:22:15 +0800
Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV
---
pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeClientCardMapper.xml | 80 ++++++++++++++++++++++++++++++++++++++++
1 files changed, 80 insertions(+), 0 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 20ef3f8..8a2ea9f 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeClientCardMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeClientCardMapper.xml
@@ -448,5 +448,85 @@
</if>
</where>
</select>
+ <!--鏍规嵁鍐滄埛濮撳悕鍜屾墜鏈哄彿鑾峰彇姘村崱鍒楄〃璁板綍鏁帮紝搴旂敤绋嬪簭浣跨敤-->
+ <select id="getCardsByClientNameAndPhoneCount" resultType="java.lang.Long">
+ SELECT
+ COUNT(*) AS recordCount
+ FROM se_client_card card
+ INNER JOIN se_client cli ON card.clientId = cli.id
+ <where>
+ card.state = 1
+ <if test = "clientName != null and clientName !=''">
+ AND cli.name like CONCAT('%',#{clientName},'%')
+ </if>
+ <if test = "phone != null and phone !=''">
+ AND cli.phone like CONCAT('%',#{phone},'%')
+ </if>
+ </where>
+ </select>
+ <!--鏍规嵁鍐滄埛濮撳悕鍜屾墜鏈哄彿鑾峰彇姘村崱鍒楄〃锛屽簲鐢ㄧ▼搴忎娇鐢�-->
+ <select id="getCardsByClientNameAndPhone" resultType="com.dy.pipIrrGlobal.voSe.VoCards2">
+ SELECT
+ card.id AS clientCardId,
+ cli.id AS clientId,
+ cli.clientNum,
+ cli.name AS clientName,
+ card.cardNum,
+ cli.phone,
+ cli.idCard,
+ card.state AS cardState,
+ (CASE
+ WHEN card.state = 1 THEN '姝e父'
+ WHEN card.state = 2 THEN '宸叉敞閿�'
+ WHEN card.state = 3 THEN '宸叉寕澶�'
+ End) AS stateName,
+ '鍐滄埛鍗�' AS cardType,
+ FORMAT(card.money, 2) AS money
+ FROM se_client_card card
+ INNER JOIN se_client cli ON card.clientId = cli.id
+ <where>
+ card.state = 1
+ <if test = "clientName != null and clientName !=''">
+ AND cli.name like CONCAT('%',#{clientName},'%')
+ </if>
+
+ <if test = "phone != null and phone !=''">
+ AND cli.phone like CONCAT('%',#{phone},'%')
+ </if>
+ </where>
+ ORDER BY card.id
+ <trim prefix="limit " >
+ <if test="start != null and count != null">
+ #{start,javaType=Integer,jdbcType=INTEGER}, #{count,javaType=Integer,jdbcType=INTEGER}
+ </if>
+ </trim>
+ </select>
+ <!--鏍规嵁鍐滄埛ID鏌ヨ姝e父鐘舵�佺殑姘村崱鍒楄〃,灏忕▼搴忎娇鐢�-->
+ <select id="getCardsByClientID" resultType="com.dy.pipIrrGlobal.voWe.VoCards3">
+ SELECT
+ card.id AS clientCardId,
+ cli.id AS clientId,
+ cli.clientNum,
+ cli.name AS clientName,
+ card.cardNum,
+ cli.phone,
+ cli.idCard,
+ card.state AS cardState,
+ (CASE
+ WHEN card.state = 1 THEN '姝e父'
+ WHEN card.state = 2 THEN '宸叉敞閿�'
+ WHEN card.state = 3 THEN '宸叉寕澶�'
+ End) AS stateName,
+ '鍐滄埛鍗�' AS cardType,
+ FORMAT(card.money, 2) AS money
+ FROM se_client_card card
+ INNER JOIN se_client cli ON card.clientId = cli.id
+ where
+ card.state = 1
+ AND cli.id like CONCAT('%',#{clientId},'%')
+
+
+ ORDER BY card.id
+ </select>
</mapper>
\ No newline at end of file
--
Gitblit v1.8.0