From 53a365fb64b49ee85f528341c785c4beab1d1f43 Mon Sep 17 00:00:00 2001
From: 刘小明 <liuxm_a@163.com>
Date: 星期二, 27 八月 2024 14:57:58 +0800
Subject: [PATCH] 修改判空方式

---
 pms-parent/pms-global/src/main/resources/mapper/PrDeviceMapper.xml |   38 +++++++++++++++++++-------------------
 1 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/pms-parent/pms-global/src/main/resources/mapper/PrDeviceMapper.xml b/pms-parent/pms-global/src/main/resources/mapper/PrDeviceMapper.xml
index 0f7b0df..8a1b2e7 100644
--- a/pms-parent/pms-global/src/main/resources/mapper/PrDeviceMapper.xml
+++ b/pms-parent/pms-global/src/main/resources/mapper/PrDeviceMapper.xml
@@ -42,18 +42,18 @@
     <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoPr.PrDevice" useGeneratedKeys="true">
         insert into pr_device
         <trim prefix="(" suffix=")" suffixOverrides=",">
-                <if test="id != null and id !=''">id,</if>
-                <if test="proId != null and proId !=''">pro_id,</if>
-                <if test="batchId != null and batchId !=''">batch_id,</if>
+                <if test="id != null">id,</if>
+                <if test="proId != null">pro_id,</if>
+                <if test="batchId != null">batch_id,</if>
                 <if test="deviceNo != null and deviceNo !=''">device_no,</if>
-                <if test="status != null and status !=''">status,</if>
+                <if test="status != null">status,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
-                <if test="id != null and id !=''">#{id,jdbcType=BIGINT},</if>
-                <if test="proId != null and proId !=''">#{proId,jdbcType=BIGINT},</if>
-                <if test="batchId != null and batchId !=''">#{batchId,jdbcType=BIGINT},</if>
+                <if test="id != null">#{id,jdbcType=BIGINT},</if>
+                <if test="proId != null">#{proId,jdbcType=BIGINT},</if>
+                <if test="batchId != null">#{batchId,jdbcType=BIGINT},</if>
                 <if test="deviceNo != null and deviceNo !=''">#{deviceNo},</if>
-                <if test="status != null and status !=''">#{status,jdbcType=TINYINT},</if>
+                <if test="status != null">#{status,jdbcType=TINYINT},</if>
         </trim>
     </insert>
     <insert id="insertBatch" parameterType="java.util.List">
@@ -72,16 +72,16 @@
     <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoPr.PrDevice">
         update pr_device
         <set>
-                <if test="proId != null and proId !=''">
+                <if test="proId != null">
                     pro_id = #{proId,jdbcType=BIGINT},
                 </if>
-                <if test="batchId != null and batchId !=''">
+                <if test="batchId != null">
                     batch_id = #{batchId,jdbcType=BIGINT},
                 </if>
                 <if test="deviceNo != null and deviceNo !=''">
                     device_no = #{deviceNo},
                 </if>
-                <if test="status != null and status !=''">
+                <if test="status != null">
                     status = #{status,jdbcType=TINYINT}
                 </if>
         </set>
@@ -102,19 +102,19 @@
         <include refid="Base_Column_List" />
         from pr_device
         <trim prefix="where" suffixOverrides="and">
-                <if test="id != null and id !=''">
+                <if test="id != null">
                     id = #{id,jdbcType=BIGINT} and
                 </if>
-                <if test="proId != null and proId !=''">
+                <if test="proId != null">
                     pro_id = #{proId,jdbcType=BIGINT} and
                 </if>
-                <if test="batchId != null and batchId !=''">
+                <if test="batchId != null">
                     batch_id = #{batchId,jdbcType=BIGINT} and
                 </if>
                 <if test="deviceNo != null and deviceNo !=''">
                     device_no = #{deviceNo,jdbcType=BIGINT} and
                 </if>
-                <if test="status != null and status !=''">
+                <if test="status != null">
                     status = #{status,jdbcType=TINYINT} and
                 </if>
         </trim>
@@ -130,19 +130,19 @@
         select count(1)
         from pr_device
         <trim prefix="where" suffixOverrides="and">
-                <if test="id != null and id !=''">
+                <if test="id != null">
                     id = #{id,jdbcType=BIGINT} and
                 </if>
-                <if test="proId != null and proId !=''">
+                <if test="proId != null">
                     pro_id = #{proId,jdbcType=BIGINT} and
                 </if>
-                <if test="batchId != null and batchId !=''">
+                <if test="batchId != null">
                     batch_id = #{batchId,jdbcType=BIGINT} and
                 </if>
                 <if test="deviceNo != null and deviceNo !=''">
                     device_no = #{deviceNo,jdbcType=BIGINT} and
                 </if>
-                <if test="status != null and status !=''">
+                <if test="status != null">
                     status = #{status,jdbcType=TINYINT} and
                 </if>
         </trim>

--
Gitblit v1.8.0