浏览代码

优化代码

fangqing 1 月之前
父节点
当前提交
280f08db40
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      ruoyi-generator/src/main/resources/mapper/community/ArticleMapper.xml

+ 3 - 0
ruoyi-generator/src/main/resources/mapper/community/ArticleMapper.xml

@@ -211,6 +211,9 @@
             <if test="communityArticle.isDraft != null and communityArticle.isDraft != '' ">
                 AND IFNULL(a.is_Draft,0) = #{communityArticle.isDraft}
             </if>
+            <if test="searchType == 3">
+                and   EXISTS (select 1 from community_article_recommend car  where car.article_id = a.id and car.is_delete != 1 or car.is_delete is null)
+            </if>
             and (a.is_delete != 1 or a.is_delete is null)
             and (f.is_delete != 1 or f.is_delete is null)
             and a.user_id not in (select distinct peer_id from community_user_block where user_id = #{loginId} and is_block = 1 )