Quellcode durchsuchen

feat(message): 判空

huey vor 1 Jahr
Ursprung
Commit
191e21d859
1 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen
  1. 3 3
      src/main/resources/mapper/MessageInfoMapper.xml

+ 3 - 3
src/main/resources/mapper/MessageInfoMapper.xml

@@ -9,13 +9,13 @@
         <if test="req.messageType != null">
             and b.message_type = #{req.messageType}
         </if>
-        <if test="req.title != null">
+        <if test="req.title != null and req.title != ''">
             and b.title = #{req.title}
         </if>
-        <if test="req.content != null">
+        <if test="req.content != null and req.content != ''">
             and b.content = #{req.content}
         </if>
-        <if test="req.deptCode != null">
+        <if test="req.deptCode != null and req.deptCode != ''">
             and a.scope_id = #{req.deptCode}
         </if>
         <if test="req.readStatus != null">