From d90aa8c7295f3005fa10757710d5e3591f4ade60 Mon Sep 17 00:00:00 2001
From: linwei <872216696@qq.com>
Date: Fri, 19 Jan 2024 17:33:13 +0800
Subject: [PATCH] 文章评论数据过滤
---
src/main/java/org/springblade/modules/article/mapper/ArticleCommentMapper.xml | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/springblade/modules/article/mapper/ArticleCommentMapper.xml b/src/main/java/org/springblade/modules/article/mapper/ArticleCommentMapper.xml
index 7baaff0..a0dcbd8 100644
--- a/src/main/java/org/springblade/modules/article/mapper/ArticleCommentMapper.xml
+++ b/src/main/java/org/springblade/modules/article/mapper/ArticleCommentMapper.xml
@@ -75,13 +75,22 @@
<if test="noticeComment.checkUser != null ">and jac.check_user = #{noticeComment.checkUser}</if>
<if test="noticeComment.checkTime != null ">and jac.check_time = #{noticeComment.checkTime}</if>
<if test="noticeComment.checkStatus != null ">and jac.check_status = #{noticeComment.checkStatus}</if>
- <if test="noticeComment.checkRemark != null and noticeComment.checkRemark != ''">and jac.check_remark = #{noticeComment.checkRemark}</if>
+ <if test="noticeComment.checkRemark != null and noticeComment.checkRemark != ''">and jac.check_remark =
+ #{noticeComment.checkRemark}
+ </if>
<if test="noticeComment.createTime != null ">and jac.create_time = #{noticeComment.createTime}</if>
<if test="noticeComment.isDeleted != null ">and jac.is_deleted = #{noticeComment.isDeleted}</if>
<if test="noticeComment.phone != null ">and bu.phone like concat('%',#{noticeComment.phone},'%')</if>
<if test="noticeComment.name != null ">and bu.name like concat('%',#{noticeComment.name},'%')</if>
- <if test="noticeComment.title != null ">and ja.title like concat('%',#{noticeComment.title},'%') </if>
+ <if test="noticeComment.title != null ">and ja.title like concat('%',#{noticeComment.title},'%')</if>
+
+ <if test="noticeComment.cityCode != null and noticeComment.cityCode != ''">
+ and ( ja.article_range like
+ <foreach collection="noticeComment.cityCode" separator=" or ja.article_range like" item="id">'%${id}%'
+ </foreach>
+ )
+ </if>
and jac.user_id is not null
order by jac.create_time desc
</where>
--
Gitblit v1.9.3