Răsfoiți Sursa

获取文章列表新增标签查询

fangqing 6 luni în urmă
părinte
comite
b15869df21

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

@@ -184,6 +184,13 @@
                     #{userId}
                 </foreach>
             </if>
+            <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}
+                </foreach>
+            </if>
+
             and (is_delete != 1 or is_delete is null)
         </where>
         group by a.id,a.create_time
@@ -294,4 +301,4 @@
         where user_id = #{userId}
           and article_id = #{articleId};
     </delete>
-</mapper>
+</mapper>