From 2c5f5e7091330a748257baab82e81038a0d22816 Mon Sep 17 00:00:00 2001
From: Fancy <Fancy.fx@outlook.com>
Date: 星期四, 26 十二月 2024 10:25:30 +0800
Subject: [PATCH] JWT have some error

---
 pms-parent/pms-global/src/main/resources/mapper/StaRepairInfoMapper.xml |   93 ++++++++++++++++++++--------------------------
 1 files changed, 41 insertions(+), 52 deletions(-)

diff --git a/pms-parent/pms-global/src/main/resources/mapper/StaRepairInfoMapper.xml b/pms-parent/pms-global/src/main/resources/mapper/StaRepairInfoMapper.xml
index c7417e8..12e4b6a 100644
--- a/pms-parent/pms-global/src/main/resources/mapper/StaRepairInfoMapper.xml
+++ b/pms-parent/pms-global/src/main/resources/mapper/StaRepairInfoMapper.xml
@@ -6,20 +6,18 @@
 
     <resultMap id="BaseResultMap" type="com.dy.pmsGlobal.pojoSta.StaRepairInfo">
             <id property="id" column="id" jdbcType="BIGINT"/>
-            <result property="equipNo" column="equip_no" jdbcType="VARCHAR"/>
-            <result property="fromNode" column="from_node" jdbcType="VARCHAR"/>
+            <result property="deviceNo" column="device_no" jdbcType="VARCHAR"/>
+            <result property="workId" column="work_id" jdbcType="BIGINT"/>
+            <result property="fromNode" column="from_node" jdbcType="BIGINT"/>
             <result property="repairReason" column="repair_reason" jdbcType="VARCHAR"/>
-            <result property="toNode" column="to_node" jdbcType="VARCHAR"/>
-            <result property="repairBy" column="repair_by" jdbcType="VARCHAR"/>
+            <result property="repairBy" column="repair_by" jdbcType="BIGINT"/>
             <result property="repairTime" column="repair_time" jdbcType="TIMESTAMP"/>
-            <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
-            <result property="createBy" column="create_by" jdbcType="BIGINT"/>
     </resultMap>
 
     <sql id="Base_Column_List">
-        id,equip_no,from_node,
-        repair_reason,to_node,repair_by,
-        repair_time,create_time,create_by
+        id,device_no,work_id,
+        from_node,repair_reason,repair_by,
+        repair_time
     </sql>
 
     <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
@@ -28,73 +26,66 @@
         from sta_repair_info
         where  id = #{id,jdbcType=BIGINT} 
     </select>
-
+    <select id="selectByDeviceNo" resultMap="BaseResultMap">
+        select
+        <include refid="Base_Column_List" />
+        from sta_repair_info
+        where  device_no = #{deviceNo,jdbcType=VARCHAR}
+    </select>
     <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
         delete from sta_repair_info
         where  id = #{id,jdbcType=BIGINT} 
     </delete>
     <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoSta.StaRepairInfo" useGeneratedKeys="true">
         insert into sta_repair_info
-        ( id,equip_no,from_node
-        ,repair_reason,to_node,repair_by
-        ,repair_time,create_time,create_by
-        )
-        values (#{id,jdbcType=BIGINT},#{equipNo,jdbcType=VARCHAR},#{fromNode,jdbcType=VARCHAR}
-        ,#{repairReason,jdbcType=VARCHAR},#{toNode,jdbcType=VARCHAR},#{repairBy,jdbcType=VARCHAR}
-        ,#{repairTime,jdbcType=TIMESTAMP},#{createTime,jdbcType=TIMESTAMP},#{createBy,jdbcType=BIGINT}
-        )
+        ( id,device_no,work_id
+        ,from_node,repair_reason,repair_by
+        ,repair_time)
+        values (#{id,jdbcType=BIGINT},#{deviceNo,jdbcType=VARCHAR},#{workId,jdbcType=BIGINT}
+        ,#{fromNode,jdbcType=BIGINT},#{repairReason,jdbcType=VARCHAR},#{repairBy,jdbcType=BIGINT}
+        ,#{repairTime,jdbcType=TIMESTAMP})
     </insert>
     <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoSta.StaRepairInfo" useGeneratedKeys="true">
         insert into sta_repair_info
         <trim prefix="(" suffix=")" suffixOverrides=",">
                 <if test="id != null">id,</if>
-                <if test="equipNo != null">equip_no,</if>
+                <if test="deviceNo != null and deviceNo !=''">device_no,</if>
+                <if test="workId != null">work_id,</if>
                 <if test="fromNode != null">from_node,</if>
-                <if test="repairReason != null">repair_reason,</if>
-                <if test="toNode != null">to_node,</if>
+                <if test="repairReason != null and repairReason !=''">repair_reason,</if>
                 <if test="repairBy != null">repair_by,</if>
                 <if test="repairTime != null">repair_time,</if>
-                <if test="createTime != null">create_time,</if>
-                <if test="createBy != null">create_by,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
                 <if test="id != null">#{id,jdbcType=BIGINT},</if>
-                <if test="equipNo != null">#{equipNo,jdbcType=VARCHAR},</if>
-                <if test="fromNode != null">#{fromNode,jdbcType=VARCHAR},</if>
-                <if test="repairReason != null">#{repairReason,jdbcType=VARCHAR},</if>
-                <if test="toNode != null">#{toNode,jdbcType=VARCHAR},</if>
-                <if test="repairBy != null">#{repairBy,jdbcType=VARCHAR},</if>
+                <if test="deviceNo != null and deviceNo !=''">#{deviceNo,jdbcType=VARCHAR},</if>
+                <if test="workId != null">#{workId,jdbcType=BIGINT},</if>
+                <if test="fromNode != null">#{fromNode,jdbcType=BIGINT},</if>
+                <if test="repairReason != null and repairReason !=''">#{repairReason,jdbcType=VARCHAR},</if>
+                <if test="repairBy != null">#{repairBy,jdbcType=BIGINT},</if>
                 <if test="repairTime != null">#{repairTime,jdbcType=TIMESTAMP},</if>
-                <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
-                <if test="createBy != null">#{createBy,jdbcType=BIGINT},</if>
         </trim>
     </insert>
     <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoSta.StaRepairInfo">
         update sta_repair_info
         <set>
-                <if test="equipNo != null">
-                    equip_no = #{equipNo,jdbcType=VARCHAR},
+                <if test="deviceNo != null and deviceNo !=''">
+                    device_no = #{deviceNo,jdbcType=VARCHAR},
+                </if>
+                <if test="workId != null">
+                    work_id = #{workId,jdbcType=BIGINT},
                 </if>
                 <if test="fromNode != null">
-                    from_node = #{fromNode,jdbcType=VARCHAR},
+                    from_node = #{fromNode,jdbcType=BIGINT},
                 </if>
-                <if test="repairReason != null">
+                <if test="repairReason != null and repairReason !=''">
                     repair_reason = #{repairReason,jdbcType=VARCHAR},
                 </if>
-                <if test="toNode != null">
-                    to_node = #{toNode,jdbcType=VARCHAR},
-                </if>
                 <if test="repairBy != null">
-                    repair_by = #{repairBy,jdbcType=VARCHAR},
+                    repair_by = #{repairBy,jdbcType=BIGINT},
                 </if>
-                <if test="repairTime != null">
+                <if test="repairTime != null and repairTime !=''">
                     repair_time = #{repairTime,jdbcType=TIMESTAMP},
-                </if>
-                <if test="createTime != null">
-                    create_time = #{createTime,jdbcType=TIMESTAMP},
-                </if>
-                <if test="createBy != null">
-                    create_by = #{createBy,jdbcType=BIGINT},
                 </if>
         </set>
         where   id = #{id,jdbcType=BIGINT} 
@@ -102,14 +93,12 @@
     <update id="updateByPrimaryKey" parameterType="com.dy.pmsGlobal.pojoSta.StaRepairInfo">
         update sta_repair_info
         set 
-            equip_no =  #{equipNo,jdbcType=VARCHAR},
-            from_node =  #{fromNode,jdbcType=VARCHAR},
+            device_no =  #{deviceNo,jdbcType=VARCHAR},
+            work_id =  #{workId,jdbcType=BIGINT},
+            from_node =  #{fromNode,jdbcType=BIGINT},
             repair_reason =  #{repairReason,jdbcType=VARCHAR},
-            to_node =  #{toNode,jdbcType=VARCHAR},
-            repair_by =  #{repairBy,jdbcType=VARCHAR},
-            repair_time =  #{repairTime,jdbcType=TIMESTAMP},
-            create_time =  #{createTime,jdbcType=TIMESTAMP},
-            create_by =  #{createBy,jdbcType=BIGINT}
+            repair_by =  #{repairBy,jdbcType=BIGINT},
+            repair_time =  #{repairTime,jdbcType=TIMESTAMP}
         where   id = #{id,jdbcType=BIGINT} 
     </update>
 </mapper>

--
Gitblit v1.8.0