修改了评论
This commit is contained in:
parent
6553531416
commit
872598cffe
@ -27,6 +27,7 @@
|
|||||||
FROM user_comment_clinical_article a
|
FROM user_comment_clinical_article a
|
||||||
LEFT JOIN user b ON a.user_id = b.user_id
|
LEFT JOIN user b ON a.user_id = b.user_id
|
||||||
WHERE a.status = 1
|
WHERE a.status = 1
|
||||||
|
AND a.article_id = #{articleId}
|
||||||
<choose>
|
<choose>
|
||||||
<when test="rootId != null and rootId != ''">
|
<when test="rootId != null and rootId != ''">
|
||||||
AND a.root_id = #{rootId}
|
AND a.root_id = #{rootId}
|
||||||
@ -49,6 +50,7 @@
|
|||||||
LEFT JOIN user b ON a.user_id = b.user_id
|
LEFT JOIN user b ON a.user_id = b.user_id
|
||||||
WHERE a.status = 1
|
WHERE a.status = 1
|
||||||
AND a.root_id = #{rootId}
|
AND a.root_id = #{rootId}
|
||||||
|
AND a.article_id = #{articleId}
|
||||||
ORDER BY a.is_top desc , a.created_at DESC
|
ORDER BY a.is_top desc , a.created_at DESC
|
||||||
limit #{limit}
|
limit #{limit}
|
||||||
</select>
|
</select>
|
||||||
@ -68,6 +70,9 @@
|
|||||||
LEFT JOIN case_clinical_article b ON a.article_id = b.article_id
|
LEFT JOIN case_clinical_article b ON a.article_id = b.article_id
|
||||||
WHERE a.status = 1
|
WHERE a.status = 1
|
||||||
AND b.article_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
|
ORDER BY a.created_at DESC
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
FROM user_comment_clinical_video a
|
FROM user_comment_clinical_video a
|
||||||
LEFT JOIN user b ON a.user_id = b.user_id
|
LEFT JOIN user b ON a.user_id = b.user_id
|
||||||
WHERE a.status = 1
|
WHERE a.status = 1
|
||||||
|
AND a.video_id = #{videoId}
|
||||||
<choose>
|
<choose>
|
||||||
<when test="rootId != null and rootId != ''">
|
<when test="rootId != null and rootId != ''">
|
||||||
AND a.root_id = #{rootId}
|
AND a.root_id = #{rootId}
|
||||||
@ -50,6 +51,9 @@
|
|||||||
LEFT JOIN case_clinical_video b ON a.video_id = b.video_id
|
LEFT JOIN case_clinical_video b ON a.video_id = b.video_id
|
||||||
WHERE a.status = 1
|
WHERE a.status = 1
|
||||||
AND b.video_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
|
ORDER BY a.created_at DESC
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@ -10,6 +10,7 @@
|
|||||||
FROM user_comment_exchange a
|
FROM user_comment_exchange a
|
||||||
LEFT JOIN user b ON a.user_id = b.user_id
|
LEFT JOIN user b ON a.user_id = b.user_id
|
||||||
WHERE a.status = 1
|
WHERE a.status = 1
|
||||||
|
AND a.exchange_id = #{exchangeId}
|
||||||
<choose>
|
<choose>
|
||||||
<when test="rootId != null and rootId != ''">
|
<when test="rootId != null and rootId != ''">
|
||||||
AND a.root_id = #{rootId}
|
AND a.root_id = #{rootId}
|
||||||
@ -32,6 +33,7 @@
|
|||||||
LEFT JOIN user b ON a.user_id = b.user_id
|
LEFT JOIN user b ON a.user_id = b.user_id
|
||||||
WHERE a.status = 1
|
WHERE a.status = 1
|
||||||
AND a.root_id = #{rootId}
|
AND a.root_id = #{rootId}
|
||||||
|
AND a.exchange_id = #{exchangeId}
|
||||||
ORDER BY a.is_top desc , a.created_at DESC
|
ORDER BY a.is_top desc , a.created_at DESC
|
||||||
limit #{limit}
|
limit #{limit}
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user