Parcourir la source

feat(message): 判空

huey il y a 1 an
Parent
commit
191e21d859
1 fichiers modifiés avec 3 ajouts et 3 suppressions
  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">