From 00cb7fea9c8ed32968ac43ef01ac1fe4e4d0931f Mon Sep 17 00:00:00 2001
From: zengh <123456>
Date: Sun, 04 Jul 2021 15:16:13 +0800
Subject: [PATCH] 聊天室接口修改

---
 src/main/java/org/springblade/modules/article/mapper/ArticleMapper.xml |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/src/main/java/org/springblade/modules/article/mapper/ArticleMapper.xml b/src/main/java/org/springblade/modules/article/mapper/ArticleMapper.xml
index fcdea60..9dee091 100644
--- a/src/main/java/org/springblade/modules/article/mapper/ArticleMapper.xml
+++ b/src/main/java/org/springblade/modules/article/mapper/ArticleMapper.xml
@@ -5,5 +5,26 @@
     <!--查询资讯分页列表信息-->
     <select id="selectArticlePage" resultType="org.springblade.modules.article.entity.Article">
         select * from sys_article
+        where 1=1
+        <if test="article.title!=null and article.title!=''">
+            and title like concat('%',#{article.title},'%')
+        </if>
+        <if test="article.sourceName!=null and article.sourceName!=''">
+            and source_name like concat('%',#{article.sourceName},'%')
+        </if>
+        <if test="article.startTime!=null and article.startTime!=''">
+            and create_time&gt;=#{article.startTime}
+        </if>
+        <if test="article.endTime!=null and article.endTime!=''">
+            and create_time&lt;=#{article.endTime}
+        </if>
+        <if test="article.articleType!=null and article.articleType!=''">
+            and article_type = #{article.articleType}
+        </if>
+        <if test="article.keyword!=null and article.keyword!=''">
+            AND CONCAT(title,source_name)
+            LIKE CONCAT ('%', #{article.keyword},'%')
+        </if>
+        order by create_time desc
     </select>
 </mapper>

--
Gitblit v1.9.3