|
@@ -171,4 +171,26 @@
|
|
|
) BB
|
|
|
|
|
|
</select>
|
|
|
+ <select id="queryComment" resultType="com.ruoyi.generator.domain.Community.CommunityArticleComment">
|
|
|
+ SELECT A.id,#{articleId} as articleId,A.content,A.user_id,A.image_url,A.create_time,A.create_by,A.update_time,A.update_by,A.address
|
|
|
+ FROM (
|
|
|
+ SELECT id,image_url,user_id,create_time,create_by,update_time,update_by,content,address
|
|
|
+ FROM community_article_comment
|
|
|
+ WHERE article_id = #{articleId}
|
|
|
+ AND (is_delete != 1 OR is_delete IS NULL)
|
|
|
+ UNION ALL
|
|
|
+ SELECT id,image_url,user_id,create_time,create_by,update_time,update_by,content,address
|
|
|
+ FROM community_comment_reply
|
|
|
+ WHERE comment_id IN (
|
|
|
+ SELECT id
|
|
|
+ FROM community_article_comment
|
|
|
+ WHERE article_id = #{articleId}
|
|
|
+ AND (is_delete != 1 OR is_delete IS NULL)
|
|
|
+ )
|
|
|
+ AND (is_delete != 1 OR is_delete IS NULL)
|
|
|
+ ) AS A
|
|
|
+ WHERE A.content LIKE CONCAT('%', #{comment}, '%');
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
</mapper>
|