From 3b58972c757734f0dc4b1ff29a0a179ed564ab64 Mon Sep 17 00:00:00 2001
From: Administrator <zhubaomin>
Date: 星期三, 17 七月 2024 11:47:42 +0800
Subject: [PATCH] 2024-07-17 朱宝民 重构命令日志表,返回结果改为text类型
---
pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeClientCardMapper.xml | 39 ++++++++++++++++++++++++++++++---------
1 files changed, 30 insertions(+), 9 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 6168066..71d1989 100644
--- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeClientCardMapper.xml
+++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeClientCardMapper.xml
@@ -5,6 +5,7 @@
<!--@mbg.generated-->
<!--@Table se_client_card-->
<id column="id" jdbcType="BIGINT" property="id" />
+ <result column="protocol" jdbcType="VARCHAR" property="protocol" />
<result column="cardAddr" jdbcType="VARCHAR" property="cardaddr" />
<result column="cardNum" jdbcType="BIGINT" property="cardnum" />
<result column="clientId" jdbcType="BIGINT" property="clientid" />
@@ -25,7 +26,7 @@
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
- id, cardAddr, cardNum, clientId, money, `state`, original_card_id, createDt, replaceDt, rechargeDt,
+ id, protocol, cardAddr, cardNum, clientId, money, `state`, original_card_id, createDt, replaceDt, rechargeDt,
lossDtDt, cancelDt, unlockDt, reversalDt, refundDt, consumeDt, lastOper, remarks
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
@@ -53,16 +54,26 @@
<!--鏍规嵁姘村崱缂栧彿鑾峰彇姘村崱琛ㄤ富閿強鍐滄埛缂栧彿-->
<select id="getCardIdAndClientNum" resultType="java.util.Map">
-<!-- SELECT id AS cardId, clientNum FROM se_client_card WHERE cardNum = #{cardNum}-->
+ <!-- SELECT id AS cardId, clientNum FROM se_client_card WHERE cardNum = #{cardNum}-->
SELECT
- card.id AS cardId,
- cli.clientNum,
- cli.id AS clientId
+ card.id AS cardId,
+ cli.clientNum,
+ cli.id AS clientId,
+ protocol
FROM se_client_card card
- INNER JOIN se_client cli ON card.clientId = cli.id
+ INNER JOIN se_client cli ON card.clientId = cli.id
WHERE card.cardNum = #{cardNum}
</select>
+ <!-- 鏍规嵁姘村崱缂栧彿鑾峰彇姘村崱瀵瑰簲鐨勫啘鎴穒d鍜屽鍚� -->
+ <select id="getClientIdAndNameByCardAddrAndCardNo" resultType="java.util.Map">
+ SELECT
+ cli.id AS clientId,
+ cli.name AS clientName
+ FROM se_client_card card
+ INNER JOIN se_client cli ON card.clientId = cli.id
+ WHERE card.cardAddr = #{cardAddr} and card.cardNum = #{cardNum}
+ </select>
<!--鏍规嵁琛屾斂鍖哄垝涓叉ā绯婃煡璇㈡按鍗$紪鍙�-->
<select id="getCardNumOfMax" resultType="java.lang.String">
@@ -75,13 +86,13 @@
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pipIrrGlobal.pojoSe.SeClientCard">
<!--@mbg.generated-->
- insert into se_client_card (id, cardAddr, cardNum, clientId,
+ insert into se_client_card (id, protocol, cardAddr, cardNum, clientId,
money, `state`, original_card_id, createDt,
replaceDt, rechargeDt, lossDtDt,
cancelDt, unlockDt, reversalDt, refundDt,
consumeDt, lastOper, remarks
)
- values (#{id,jdbcType=BIGINT}, #{cardaddr,jdbcType=VARCHAR}, #{cardnum,jdbcType=BIGINT}, #{clientid,jdbcType=BIGINT},
+ values (#{id,jdbcType=BIGINT}, #{protocol,jdbcType=VARCHAR}, #{cardaddr,jdbcType=VARCHAR}, #{cardnum,jdbcType=BIGINT}, #{clientid,jdbcType=BIGINT},
#{money,jdbcType=FLOAT}, #{state,jdbcType=TINYINT}, #{originalCardId,jdbcType=BIGINT}, #{createdt,jdbcType=TIMESTAMP},
#{replacedt,jdbcType=TIMESTAMP}, #{rechargedt,jdbcType=TIMESTAMP}, #{lossdtdt,jdbcType=TIMESTAMP},
#{canceldt,jdbcType=TIMESTAMP}, #{unlockdt,jdbcType=TIMESTAMP}, #{reversaldt,jdbcType=TIMESTAMP},
@@ -93,6 +104,9 @@
<!--@mbg.generated-->
insert into se_client_card
<trim prefix="(" suffix=")" suffixOverrides=",">
+ <if test="protocol != null">
+ protocol,
+ </if>
<if test="cardaddr != null">
cardAddr,
</if>
@@ -146,6 +160,9 @@
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
+ <if test="protocol != null">
+ #{protocol,jdbcType=VARCHAR},
+ </if>
<if test="cardaddr != null">
#{cardaddr,jdbcType=VARCHAR},
</if>
@@ -203,6 +220,9 @@
<!--@mbg.generated-->
update se_client_card
<set>
+ <if test="protocol != null">
+ protocol = #{protocol,jdbcType=VARCHAR},
+ </if>
<if test="cardaddr != null">
cardAddr = #{cardaddr,jdbcType=VARCHAR},
</if>
@@ -260,7 +280,8 @@
<update id="updateByPrimaryKey" parameterType="com.dy.pipIrrGlobal.pojoSe.SeClientCard">
<!--@mbg.generated-->
update se_client_card
- set cardAddr = #{cardaddr,jdbcType=VARCHAR},
+ set protocol = #{protocol,jdbcType=VARCHAR}
+ cardAddr = #{cardaddr,jdbcType=VARCHAR},
cardNum = #{cardnum,jdbcType=BIGINT},
clientId = #{clientid,jdbcType=BIGINT},
money = #{money,jdbcType=FLOAT},
--
Gitblit v1.8.0