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/PrScheduleMapper.xml |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/pms-parent/pms-global/src/main/resources/mapper/PrScheduleMapper.xml b/pms-parent/pms-global/src/main/resources/mapper/PrScheduleMapper.xml
index 401102e..93de9e8 100644
--- a/pms-parent/pms-global/src/main/resources/mapper/PrScheduleMapper.xml
+++ b/pms-parent/pms-global/src/main/resources/mapper/PrScheduleMapper.xml
@@ -41,16 +41,16 @@
     <!--@mbg.generated-->
     insert into pr_schedule
     <trim prefix="(" suffix=")" suffixOverrides=",">
-      <if test="id != null and id !=''">
+      <if test="id != null">
         id,
       </if>
-      <if test="userId != null and userId !=''">
+      <if test="userId != null">
         user_id,
       </if>
       <if test="scheduleDate != null and scheduleDate !=''">
         schedule_date,
       </if>
-      <if test="deleted != null and deleted !=''">
+      <if test="deleted != null">
         deleted,
       </if>
       <if test="dt != null and dt !=''">
@@ -58,16 +58,16 @@
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
-      <if test="id != null and id !=''">
+      <if test="id != null">
         #{id,jdbcType=BIGINT},
       </if>
-      <if test="userId != null and userId !=''">
+      <if test="userId != null">
         #{userId,jdbcType=BIGINT},
       </if>
       <if test="scheduleDate != null  and scheduleDate !=''">
         #{scheduleDate,jdbcType=VARCHAR},
       </if>
-      <if test="deleted != null and deleted !=''">
+      <if test="deleted != null">
         #{deleted,jdbcType=TINYINT},
       </if>
       <if test="dt != null and dt !=''">
@@ -79,13 +79,13 @@
     <!--@mbg.generated-->
     update pr_schedule
     <set>
-      <if test="userId != null and userId !=''">
+      <if test="userId != null">
         user_id = #{userId,jdbcType=BIGINT},
       </if>
       <if test="scheduleDate != null  and scheduleDate !=''">
         schedule_date = #{scheduleDate,jdbcType=VARCHAR},
       </if>
-      <if test="deleted != null and deleted !=''">
+      <if test="deleted != null">
         deleted = #{deleted,jdbcType=TINYINT},
       </if>
     </set>
@@ -104,7 +104,7 @@
     select count(1)
     from pr_schedule
     where deleted = 0
-    <if test="userId != null and userId !=''">
+    <if test="userId != null">
       and user_id = #{userId,jdbcType=BIGINT}
     </if>
     <if test="scheduleDate != null  and scheduleDate !=''">
@@ -117,7 +117,7 @@
     <include refid="Base_Column_List" />
     from pr_schedule
     where deleted = 0
-    <if test="userId != null and userId !=''">
+    <if test="userId != null">
       and user_id = #{userId}
     </if>
     <if test="scheduleDate != null  and scheduleDate !=''">
@@ -130,7 +130,7 @@
     <include refid="Base_Column_List" />
     from pr_schedule
     where deleted = 0
-    <if test="userId != null  and userId !=''">
+    <if test="userId != null">
       and user_id = #{userId}
     </if>
     <if test="scheduleDate != null  and scheduleDate !=''">

--
Gitblit v1.8.0