Преглед изворни кода

fix-[xmg二期]:sql中去除时间判断是否为‘’

seeseele пре 7 месеци
родитељ
комит
2464278753

+ 4 - 4
src/main/resources/mybatis/VRdemo/ResearchMapper.xml

@@ -28,7 +28,7 @@
                 '%')
             </if>
             <if test="topic != null  and topic != ''">and topic like concat('%', #{topic}, '%')</if>
-            <if test="publicationTime != null and publicationTime != ''">and publication_time = #{publicationTime}</if>
+            <if test="publicationTime != null ">and publication_time = #{publicationTime}</if>
             <if test="category != null  and category != ''">and category like concat('%', #{category}, '%')</if>
         </where>
     </select>
@@ -50,7 +50,7 @@
             <if test="author != null and author != ''">author,</if>
             <if test="institution != null and institution != ''">institution,</if>
             <if test="topic != null and topic != ''">topic,</if>
-            <if test="publicationTime != null and publicationTime != ''">publication_time,</if>
+            <if test="publicationTime != null ">publication_time,</if>
             <if test="category != null">category,</if>
             <if test="createBy != null and createBy != ''">create_by,</if>
             <if test="createTime != null ">create_time,</if>
@@ -62,7 +62,7 @@
             <if test="author != null and author != ''">#{author},</if>
             <if test="institution != null and institution != ''">#{institution},</if>
             <if test="topic != null and topic != ''">#{topic},</if>
-            <if test="publicationTime != null and publicationTime != ''">#{publicationTime},</if>
+            <if test="publicationTime != null ">#{publicationTime},</if>
             <if test="category != null">#{category},</if>
             <if test="createBy != null and createBy != ''">#{createBy},</if>
             <if test="createTime != null ">#{createTime},</if>
@@ -87,7 +87,7 @@
             <if test="author != null and author != ''">author = #{author},</if>
             <if test="institution != null and institution != ''">institution = #{institution},</if>
             <if test="topic != null and topic != ''">topic = #{topic},</if>
-            <if test="publicationTime != null and publicationTime != ''">publication_time = #{publicationTime},</if>
+            <if test="publicationTime != null ">publication_time = #{publicationTime},</if>
             <if test="category != null">category = #{category},</if>
             <if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
             <if test="createTime != null ">create_time = #{createTime},</if>

+ 4 - 4
src/main/resources/mybatis/VRdemo/ThesisMapper.xml

@@ -35,7 +35,7 @@
             <if test="major != null  and major != ''">and major like concat('%', #{major}, '%')</if>
             <if test="title != null  and title != ''"> and title like concat('%', #{title}, '%')</if>
             <if test="keyword != null  and keyword != ''">and keyword like concat('%', #{keyword}, '%')</if>
-            <if test="replyTime != null  and replyTime != ''">and reply_time = #{replyTime}</if>
+            <if test="replyTime != null ">and reply_time = #{replyTime}</if>
             <if test="degree != null  and degree != ''">and degree like concat('%', #{degree}, '%')</if>
         </where>
     </select>
@@ -58,7 +58,7 @@
             <if test="major != null and major != ''">major,</if>
             <if test="title != null and title != ''">title,</if>
             <if test="keyword != null and keyword != ''">keyword,</if>
-            <if test="replyTime != null and replyTime != ''">reply_time,</if>
+            <if test="replyTime != null">reply_time,</if>
             <if test="degree != null and degree != ''">degree,</if>
             <if test="createBy != null and createBy != ''">create_by,</if>
             <if test="createTime != null ">create_time,</if>
@@ -71,7 +71,7 @@
             <if test="major != null and major != ''">#{major},</if>
             <if test="title != null and title != ''">#{title},</if>
             <if test="keyword != null and keyword != ''">#{keyword},</if>
-            <if test="replyTime != null and replyTime != ''">#{replyTime},</if>
+            <if test="replyTime != null">#{replyTime},</if>
             <if test="degree != null and degree != ''">#{degree},</if>
             <if test="createBy != null and createBy != ''">#{createBy},</if>
             <if test="createTime != null ">#{createTime},</if>
@@ -97,7 +97,7 @@
             <if test="major != null and major != ''">major = #{major},</if>
             <if test="title != null and title != ''">title = #{title},</if>
             <if test="keyword != null and keyword != ''">keyword = #{keyword},</if>
-            <if test="replyTime != null and replyTime != ''">reply_time = #{replyTime},</if>
+            <if test="replyTime != null">reply_time = #{replyTime},</if>
             <if test="degree != null and degree != ''">degree = #{degree},</if>
             <if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
             <if test="createTime != null ">create_time = #{createTime},</if>