فهرست منبع

获取文章列表标签查询优化通过名称进行查询

fangqing 6 ماه پیش
والد
کامیت
6c17cbfd91
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      ruoyi-generator/src/main/resources/mapper/community/ArticleMapper.xml

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

@@ -187,7 +187,7 @@
             <if test="communityArticle.tags != null and communityArticle.tags.size > 0">
                 AND f.tag_id in
                 <foreach collection="communityArticle.tags" item="tags" index="index" open="(" close=")" separator=",">
-                    #{tags}
+                    ( select distinct  id from  community_tag where tag_name   like  concat('%',  #{tags}, '%')  )
                 </foreach>
             </if>