From 62cd133e894d8cc8d527d5e94a4310794e03f763 Mon Sep 17 00:00:00 2001
From: zhongrj <646384940@qq.com>
Date: Tue, 14 Nov 2023 14:12:20 +0800
Subject: [PATCH] 试用期校验去除
---
src/main/java/org/springblade/modules/article/mapper/ArticleMapper.xml | 75 +++++++++++++++++++++++++++++++++++--
1 files changed, 70 insertions(+), 5 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 edcd5f8..3ca1251 100644
--- a/src/main/java/org/springblade/modules/article/mapper/ArticleMapper.xml
+++ b/src/main/java/org/springblade/modules/article/mapper/ArticleMapper.xml
@@ -18,6 +18,36 @@
<if test="article.endTime!=null and article.endTime!=''">
and create_time<=#{article.endTime}
</if>
+ <if test="article.publish!=null and article.publish!=''">
+ and publish = #{article.publish}
+ </if>
+ <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>
+ and iswords = "0"
+ order by id desc
+ </select>
+
+ <!--查询资讯敏感词预警-->
+ <select id="pageWords" 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>=#{article.startTime}
+ </if>
+ <if test="article.endTime!=null and article.endTime!=''">
+ and create_time<=#{article.endTime}
+ </if>
<if test="article.articleType!=null and article.articleType!=''">
and article_type = #{article.articleType}
</if>
@@ -25,7 +55,8 @@
AND CONCAT(title,source_name)
LIKE CONCAT ('%', #{article.keyword},'%')
</if>
- order by create_time desc
+ and iswords = "1"
+ order by id desc
</select>
<!--查询资讯分页列表信息-->
@@ -42,7 +73,8 @@
<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
+ and iswords = "0"
+ order by id desc
</select>
<!--查询收藏资讯分页列表信息-->
@@ -64,7 +96,8 @@
<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
+ and iswords = "0"
+ order by id desc
</select>
<!--查询资讯分页列表信息-->
@@ -127,7 +160,8 @@
<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
+ and iswords = "0"
+ order by id desc
</select>
<!--查询资讯分页列表信息-->
@@ -191,11 +225,42 @@
<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
+ and iswords = "0"
+ order by id desc
</select>
<update id="upcomment">
update sys_article set iscomment = #{type}
where id in(${ids})
</update>
+
+ <!--个人资讯-->
+ <select id="selectArticleG" 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>=#{article.startTime}
+ </if>
+ <if test="article.endTime!=null and article.endTime!=''">
+ and create_time<=#{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>
+ <if test="(article.rolename==null and article.rolename=='') or (article.rolename!='administrator' and article.rolename!='policeAdmin')">
+ AND publish = 1
+ </if>
+ and iswords = "0" and type!=1
+ order by id desc
+ </select>
</mapper>
--
Gitblit v1.9.3