From 893fda95385e39c2c810c6f3ac3758a63d11d4ae Mon Sep 17 00:00:00 2001
From: 刘小明 <liuxm_a@163.com>
Date: 星期三, 04 九月 2024 16:33:25 +0800
Subject: [PATCH] 修改时间类型的判空

---
 pms-parent/pms-global/src/main/resources/mapper/PrScheduleMapper.xml |   13 +++++++------
 1 files changed, 7 insertions(+), 6 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 a225d6d..40353c9 100644
--- a/pms-parent/pms-global/src/main/resources/mapper/PrScheduleMapper.xml
+++ b/pms-parent/pms-global/src/main/resources/mapper/PrScheduleMapper.xml
@@ -47,7 +47,7 @@
       <if test="userId != null">
         user_id,
       </if>
-      <if test="scheduleDate != null">
+      <if test="scheduleDate != null and scheduleDate !=''">
         schedule_date,
       </if>
       <if test="deleted != null">
@@ -64,7 +64,7 @@
       <if test="userId != null">
         #{userId,jdbcType=BIGINT},
       </if>
-      <if test="scheduleDate != null">
+      <if test="scheduleDate != null  and scheduleDate !=''">
         #{scheduleDate,jdbcType=VARCHAR},
       </if>
       <if test="deleted != null">
@@ -82,7 +82,7 @@
       <if test="userId != null">
         user_id = #{userId,jdbcType=BIGINT},
       </if>
-      <if test="scheduleDate != null">
+      <if test="scheduleDate != null  and scheduleDate !=''">
         schedule_date = #{scheduleDate,jdbcType=VARCHAR},
       </if>
       <if test="deleted != null">
@@ -107,7 +107,7 @@
     <if test="userId != null">
       and user_id = #{userId,jdbcType=BIGINT}
     </if>
-    <if test="scheduleDate != null">
+    <if test="scheduleDate != null  and scheduleDate !=''">
       and schedule_date = #{scheduleDate,jdbcType=VARCHAR}
     </if>
   </select>
@@ -120,7 +120,7 @@
     <if test="userId != null">
       and user_id = #{userId}
     </if>
-    <if test="scheduleDate != null">
+    <if test="scheduleDate != null  and scheduleDate !=''">
       and schedule_date = #{scheduleDate}
     </if>
   </select>
@@ -133,8 +133,9 @@
     <if test="userId != null">
       and user_id = #{userId}
     </if>
-    <if test="scheduleDate != null">
+    <if test="scheduleDate != null  and scheduleDate !=''">
       and schedule_date = #{scheduleDate}
     </if>
+    order by schedule_date desc
   </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.8.0