|
|
@ -10,7 +10,7 @@ |
|
|
<select id="selectUserLikeCount" resultType="java.lang.Integer"> |
|
|
<select id="selectUserLikeCount" resultType="java.lang.Integer"> |
|
|
SELECT COUNT(1) |
|
|
SELECT COUNT(1) |
|
|
FROM mini_adoption_diary_comment_like |
|
|
FROM mini_adoption_diary_comment_like |
|
|
WHERE note_comment_id = #{commentId} |
|
|
WHERE diary_comment_id = #{commentId} |
|
|
AND mini_user_id = #{userId} |
|
|
AND mini_user_id = #{userId} |
|
|
AND is_deleted = 0 |
|
|
AND is_deleted = 0 |
|
|
</select> |
|
|
</select> |
|
|
@ -18,9 +18,9 @@ |
|
|
<!-- 新增或更新点赞记录 --> |
|
|
<!-- 新增或更新点赞记录 --> |
|
|
<insert id="insertOrUpdateLike"> |
|
|
<insert id="insertOrUpdateLike"> |
|
|
INSERT INTO mini_adoption_diary_comment_like |
|
|
INSERT INTO mini_adoption_diary_comment_like |
|
|
(uuid, note_comment_id, mini_user_id, create_timestamp, create_time, create_by, is_deleted) |
|
|
(uuid, diary_comment_id, mini_user_id, create_timestamp, create_time, create_by, is_deleted) |
|
|
VALUES |
|
|
VALUES |
|
|
(#{uuid}, #{noteCommentId}, #{miniUserId}, #{createTimestamp}, #{createTime}, #{createBy}, 0) |
|
|
(#{uuid}, #{diaryCommentId}, #{miniUserId}, #{createTimestamp}, #{createTime}, #{createBy}, 0) |
|
|
ON DUPLICATE KEY UPDATE |
|
|
ON DUPLICATE KEY UPDATE |
|
|
is_deleted = 0, |
|
|
is_deleted = 0, |
|
|
update_timestamp = #{createTimestamp}, |
|
|
update_timestamp = #{createTimestamp}, |
|
|
@ -35,7 +35,7 @@ |
|
|
update_time = NOW(), |
|
|
update_time = NOW(), |
|
|
update_timestamp = #{currentTime}, |
|
|
update_timestamp = #{currentTime}, |
|
|
update_by = #{userId} |
|
|
update_by = #{userId} |
|
|
WHERE note_comment_id = #{commentId} |
|
|
WHERE diary_comment_id = #{commentId} |
|
|
AND mini_user_id = #{userId} |
|
|
AND mini_user_id = #{userId} |
|
|
AND is_deleted = 0 |
|
|
AND is_deleted = 0 |
|
|
</update> |
|
|
</update> |
|
|
|