From 2d394d9b0b82d67681ebc8c81f09080e4ad0554c Mon Sep 17 00:00:00 2001
From: zengh <123456>
Date: Tue, 14 Sep 2021 18:49:00 +0800
Subject: [PATCH] 版本更新

---
 src/main/java/org/springblade/modules/article/mapper/ArticleMapper.xml |   25 +++++++++++++++++++++++++
 1 files changed, 25 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 adc6620..ea91a91 100644
--- a/src/main/java/org/springblade/modules/article/mapper/ArticleMapper.xml
+++ b/src/main/java/org/springblade/modules/article/mapper/ArticleMapper.xml
@@ -18,5 +18,30 @@
         <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>
+
+    <!--查询资讯分页列表信息-->
+    <select id="pageDate" resultType="org.springblade.modules.article.entity.Article">
+        select * from sys_article
+        where 1=1
+        <if test="article.articleType!=null and article.articleType!=''">
+            and article_type LIKE CONCAT ('%', #{article.articleType},'%')
+        </if>
+        <if test="article.keyword!=null and article.keyword!=''">
+            AND CONCAT(title,source_name)
+            LIKE CONCAT ('%', #{article.keyword},'%')
+        </if>
+        <if test="(article.rolename==null and article.rolename=='') or (article.rolename!='administrator' and article.rolename!='policeAdmin')">
+            AND publish = 1
+        </if>
+        order by create_time desc
     </select>
 </mapper>

--
Gitblit v1.9.3