From 9af76a989343d4cfbb5e900c97e7e440d6597647 Mon Sep 17 00:00:00 2001
From: zengh <123456>
Date: Thu, 26 Aug 2021 17:24:16 +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