修改了评论

This commit is contained in:
wucongxing8150 2025-07-16 13:37:36 +08:00
parent 6553531416
commit 872598cffe
3 changed files with 11 additions and 0 deletions

View File

@ -27,6 +27,7 @@
FROM user_comment_clinical_article a
LEFT JOIN user b ON a.user_id = b.user_id
WHERE a.status = 1
AND a.article_id = #{articleId}
<choose>
<when test="rootId != null and rootId != ''">
AND a.root_id = #{rootId}
@ -49,6 +50,7 @@
LEFT JOIN user b ON a.user_id = b.user_id
WHERE a.status = 1
AND a.root_id = #{rootId}
AND a.article_id = #{articleId}
ORDER BY a.is_top desc , a.created_at DESC
limit #{limit}
</select>
@ -68,6 +70,9 @@
LEFT JOIN case_clinical_article b ON a.article_id = b.article_id
WHERE a.status = 1
AND b.article_status = 1
<if test="userId != null and userId != ''">
AND a.user_id = #{userId}
</if>
ORDER BY a.created_at DESC
</select>

View File

@ -9,6 +9,7 @@
FROM user_comment_clinical_video a
LEFT JOIN user b ON a.user_id = b.user_id
WHERE a.status = 1
AND a.video_id = #{videoId}
<choose>
<when test="rootId != null and rootId != ''">
AND a.root_id = #{rootId}
@ -50,6 +51,9 @@
LEFT JOIN case_clinical_video b ON a.video_id = b.video_id
WHERE a.status = 1
AND b.video_status = 1
<if test="userId != null and userId != ''">
AND a.user_id = #{userId}
</if>
ORDER BY a.created_at DESC
</select>

View File

@ -10,6 +10,7 @@
FROM user_comment_exchange a
LEFT JOIN user b ON a.user_id = b.user_id
WHERE a.status = 1
AND a.exchange_id = #{exchangeId}
<choose>
<when test="rootId != null and rootId != ''">
AND a.root_id = #{rootId}
@ -32,6 +33,7 @@
LEFT JOIN user b ON a.user_id = b.user_id
WHERE a.status = 1
AND a.root_id = #{rootId}
AND a.exchange_id = #{exchangeId}
ORDER BY a.is_top desc , a.created_at DESC
limit #{limit}
</select>