From 07a8e96750473fbdf676993191c41155ddf8146e Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期二, 01 七月 2025 15:55:20 +0800 Subject: [PATCH] 视频点赞实现 --- framework/src/main/resources/mapper/lmk/ThumbsUpRecordMapper.xml | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/framework/src/main/resources/mapper/lmk/ThumbsUpRecordMapper.xml b/framework/src/main/resources/mapper/lmk/ThumbsUpRecordMapper.xml index a0a28e7..48008b4 100644 --- a/framework/src/main/resources/mapper/lmk/ThumbsUpRecordMapper.xml +++ b/framework/src/main/resources/mapper/lmk/ThumbsUpRecordMapper.xml @@ -56,4 +56,31 @@ LTUR.ref_id </select> + <select id="countNumGroupByVideo" resultType="cn.lili.modules.lmk.domain.vo.CollectTypeNumVO"> + SELECT + LV.id as id, + count(LTUR.ref_id) as countNum + FROM + lmk_video LV + LEFT JOIN lmk_thumbs_up_record LTUR ON LTUR.ref_id = LV.id AND LTUR.thumbs_up_type = 'video' AND LTUR.delete_flag = 0 + WHERE + LV.thumbs_up_num_job = 1 + AND LV.delete_flag = 0 + GROUP BY + LTUR.ref_id + </select> + + <select id="getThumbssByVideoIds" resultType="cn.lili.modules.lmk.domain.vo.SimpleMyThumbsUpVO"> + SELECT + id, + ref_id as refId + FROM + lmk_thumbs_up_record + WHERE + user_id = #{userId} + AND delete_flag = 0 + AND thumbs_up_type = 'video' + AND ref_id IN <foreach collection="videoIds" open="(" item="videoId" close=")" separator=",">#{videoId}</foreach> + </select> + </mapper> -- Gitblit v1.8.0