Browse Source

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

fangqing 6 tháng trước cách đây
mục cha
commit
6c17cbfd91

+ 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>