Update ArticleMapper.xml

fixselectArticlesByTagName method's bug
This commit is contained in:
sunzy 2023-05-29 21:08:20 +08:00 committed by GitHub
parent cda45adb7c
commit b08f181c55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -125,7 +125,9 @@
where topic.id = vtt.id_topic and topic.topic_uri = #{topicName}))) order by updated_time desc
</select>
<select id="selectArticlesByTagName" resultMap="DTOResultMap">
select art.*,su.nickname,su.avatar_url from forest_article art join forest_user su on art.article_author_id = su.id order by updated_time desc
select art.*,su.nickname,su.avatar_url from forest_article art join forest_user su on art.article_author_id = su.id where
FIND_IN_SET(#{tagName},art.article_tags) > 0
order by updated_time desc
</select>
<select id="selectUserArticles" resultMap="DTOResultMap">
select art.*,su.nickname,su.avatar_url from forest_article art join forest_user su on su.id = #{idUser}
@ -162,4 +164,4 @@
and FIND_IN_SET('公告',art.article_tags) > 0
order by updated_time desc
</select>
</mapper>
</mapper>