From 6eab5ecc0a1cf8bcf1ee999457104e2281e767d2 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期二, 19 十二月 2023 15:57:40 +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 |  100 ++++++++++++++++++++++++++++---------------------
 1 files changed, 57 insertions(+), 43 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 8acacf5..0b3cbec 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeClientCardMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeClientCardMapper.xml
@@ -6,7 +6,8 @@
     <!--@Table se_client_card-->
     <id column="id" jdbcType="BIGINT" property="id" />
     <result column="cardAddr" jdbcType="VARCHAR" property="cardaddr" />
-    <result column="clientId" jdbcType="BIGINT" property="clientid" />
+    <result column="cardNum" jdbcType="VARCHAR" property="cardnum" />
+    <result column="clientNum" jdbcType="VARCHAR" property="clientnum" />
     <result column="money" jdbcType="FLOAT" property="money" />
     <result column="state" jdbcType="TINYINT" property="state" />
     <result column="createDt" jdbcType="TIMESTAMP" property="createdt" />
@@ -22,8 +23,8 @@
   </resultMap>
   <sql id="Base_Column_List">
     <!--@mbg.generated-->
-    id, cardAddr, clientId, money, `state`, createDt, replaceDt, rechargeDt, lossDtDt, 
-    cancelDt, unlockDt, reversalDt, consumeDt, lastOper, remarks
+    id, cardAddr, cardNum, clientNum, money, `state`, createDt, replaceDt, rechargeDt, 
+    lossDtDt, cancelDt, unlockDt, reversalDt, consumeDt, lastOper, remarks
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
     <!--@mbg.generated-->
@@ -38,44 +39,47 @@
     where id = #{id,jdbcType=BIGINT}
   </delete>
 
-  <!--渚濇嵁姘村崱鍦板潃鑾峰彇姘村崱缂栧彿锛堜富閿級-->
+  <!--渚濇嵁姘村崱鍦板潃鑾峰彇姘村崱缂栧彿锛�12鏈�19鏃ュ簾寮冿級-->
   <select id="getCardIdByAddr" resultType="java.lang.Long">
     SELECT id AS cardId FROM se_client_card WHERE cardAddr = #{cardAddr}
   </select>
 
-  <insert id="insert" parameterType="com.dy.pipIrrGlobal.pojoSe.SeClientCard">
-    <!--@mbg.generated-->
-    insert into se_client_card (id, cardAddr, clientId, money, `state`, createDt, replaceDt, rechargeDt, lossDtDt, cancelDt, unlockDt, reversalDt, consumeDt, lastOper, remarks)
-    values (#{id,jdbcType=BIGINT},
-            #{cardaddr,jdbcType=VARCHAR},
-            #{clientid,jdbcType=BIGINT},
-            #{money,jdbcType=FLOAT},
-            #{state,jdbcType=TINYINT},
-            #{createdt,jdbcType=TIMESTAMP},
-            #{replacedt,jdbcType=TIMESTAMP},
-            #{rechargedt,jdbcType=TIMESTAMP},
-            #{lossdtdt,jdbcType=TIMESTAMP},
-            #{canceldt,jdbcType=TIMESTAMP},
-            #{unlockdt,jdbcType=TIMESTAMP},
-            #{reversaldt,jdbcType=TIMESTAMP},
-            #{consumedt,jdbcType=TIMESTAMP},
-            #{lastoper,jdbcType=TINYINT},
-            #{remarks,jdbcType=VARCHAR})
-  </insert>
+  <!--鏍规嵁姘村崱缂栧彿鑾峰彇姘村崱琛ㄤ富閿紙12鏈�19鏃ユ坊鍔犲悗搴熷純锛�-->
+  <select id="getCardIdByNum" resultType="java.lang.Long">
+    SELECT id AS cardId FROM se_client_card WHERE cardNum = #{cardNum}
+  </select>
 
-<!--  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeClientCard" useGeneratedKeys="true">-->
-<!--    &lt;!&ndash;@mbg.generated&ndash;&gt;-->
-<!--    insert into se_client_card (cardAddr, clientId, money, -->
-<!--      `state`, createDt, replaceDt, -->
-<!--      rechargeDt, lossDtDt, cancelDt, -->
-<!--      unlockDt, reversalDt, consumeDt, -->
-<!--      lastOper, remarks)-->
-<!--    values (#{cardaddr,jdbcType=VARCHAR}, #{clientid,jdbcType=BIGINT}, #{money,jdbcType=FLOAT}, -->
-<!--      #{state,jdbcType=TINYINT}, #{createdt,jdbcType=TIMESTAMP}, #{replacedt,jdbcType=TIMESTAMP}, -->
-<!--      #{rechargedt,jdbcType=TIMESTAMP}, #{lossdtdt,jdbcType=TIMESTAMP}, #{canceldt,jdbcType=TIMESTAMP}, -->
-<!--      #{unlockdt,jdbcType=TIMESTAMP}, #{reversaldt,jdbcType=TIMESTAMP}, #{consumedt,jdbcType=TIMESTAMP}, -->
-<!--      #{lastoper,jdbcType=TINYINT}, #{remarks,jdbcType=VARCHAR})-->
-<!--  </insert>-->
+  <!--鏍规嵁姘村崱缂栧彿鑾峰彇姘村崱琛ㄤ富閿強鍐滄埛缂栧彿-->
+  <select id="getCardIdAndClientNum" resultType="java.util.Map">
+    SELECT id AS cardId, clientNum FROM se_client_card WHERE cardNum = #{cardNum}
+  </select>
+
+
+  <!--鏍规嵁琛屾斂鍖哄垝涓叉ā鍧楁煡璇㈡按鍗$紪鍙�-->
+  <select id="getCardNumOfMax"  resultType="java.lang.String">
+    SELECT cardNum
+    FROM se_client_card
+    WHERE cardNum LIKE CONCAT('%',#{areaCode},'%')
+    ORDER BY cardNum desc
+    LIMIT 0,1
+  </select>
+
+  <!--娣诲姞姘村崱璁板綍-->
+  <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeClientCard" useGeneratedKeys="true">
+    <!--@mbg.generated-->
+    insert into se_client_card (id, cardAddr, cardNum, clientNum,
+      money, `state`, createDt,
+      replaceDt, rechargeDt, lossDtDt,
+      cancelDt, unlockDt, reversalDt,
+      consumeDt, lastOper, remarks
+      )
+    values (#{id,jdbcType=BIGINT}, #{cardaddr,jdbcType=VARCHAR}, #{cardnum,jdbcType=VARCHAR}, #{clientnum,jdbcType=VARCHAR},
+      #{money,jdbcType=FLOAT}, #{state,jdbcType=TINYINT}, #{createdt,jdbcType=TIMESTAMP},
+      #{replacedt,jdbcType=TIMESTAMP}, #{rechargedt,jdbcType=TIMESTAMP}, #{lossdtdt,jdbcType=TIMESTAMP},
+      #{canceldt,jdbcType=TIMESTAMP}, #{unlockdt,jdbcType=TIMESTAMP}, #{reversaldt,jdbcType=TIMESTAMP},
+      #{consumedt,jdbcType=TIMESTAMP}, #{lastoper,jdbcType=TINYINT}, #{remarks,jdbcType=VARCHAR}
+      )
+  </insert>
 
   <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeClientCard" useGeneratedKeys="true">
     <!--@mbg.generated-->
@@ -84,8 +88,11 @@
       <if test="cardaddr != null">
         cardAddr,
       </if>
-      <if test="clientid != null">
-        clientId,
+      <if test="cardnum != null">
+        cardNum,
+      </if>
+      <if test="clientnum != null">
+        clientNum,
       </if>
       <if test="money != null">
         money,
@@ -128,8 +135,11 @@
       <if test="cardaddr != null">
         #{cardaddr,jdbcType=VARCHAR},
       </if>
-      <if test="clientid != null">
-        #{clientid,jdbcType=BIGINT},
+      <if test="cardnum != null">
+        #{cardnum,jdbcType=VARCHAR},
+      </if>
+      <if test="clientnum != null">
+        #{clientnum,jdbcType=VARCHAR},
       </if>
       <if test="money != null">
         #{money,jdbcType=FLOAT},
@@ -176,8 +186,11 @@
       <if test="cardaddr != null">
         cardAddr = #{cardaddr,jdbcType=VARCHAR},
       </if>
-      <if test="clientid != null">
-        clientId = #{clientid,jdbcType=BIGINT},
+      <if test="cardnum != null">
+        cardNum = #{cardnum,jdbcType=VARCHAR},
+      </if>
+      <if test="clientnum != null">
+        clientNum = #{clientnum,jdbcType=VARCHAR},
       </if>
       <if test="money != null">
         money = #{money,jdbcType=FLOAT},
@@ -222,7 +235,8 @@
     <!--@mbg.generated-->
     update se_client_card
     set cardAddr = #{cardaddr,jdbcType=VARCHAR},
-      clientId = #{clientid,jdbcType=BIGINT},
+      cardNum = #{cardnum,jdbcType=VARCHAR},
+      clientNum = #{clientnum,jdbcType=VARCHAR},
       money = #{money,jdbcType=FLOAT},
       `state` = #{state,jdbcType=TINYINT},
       createDt = #{createdt,jdbcType=TIMESTAMP},

--
Gitblit v1.8.0