From e0beab0edb7049fdf46aca17f32f9dc5f4a8a755 Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期四, 29 五月 2025 17:33:15 +0800 Subject: [PATCH] 视频评论数定时任务、视频评论查询 --- framework/src/main/resources/mapper/lmk/VideoMapper.xml | 17 ++++++++++++++++- 1 files changed, 16 insertions(+), 1 deletions(-) diff --git a/framework/src/main/resources/mapper/lmk/VideoMapper.xml b/framework/src/main/resources/mapper/lmk/VideoMapper.xml index 12e953f..be18336 100644 --- a/framework/src/main/resources/mapper/lmk/VideoMapper.xml +++ b/framework/src/main/resources/mapper/lmk/VideoMapper.xml @@ -172,7 +172,7 @@ UPDATE lmk_video SET collect_num = CASE id <foreach collection="list" item="video"> - WHEN #{video.id} THEN #{video.collectNum} + WHEN #{video.id} THEN #{video.countNum} </foreach> ELSE collect_num END @@ -182,4 +182,19 @@ </foreach> </update> + + <update id="updateCommentNumBatch"> + UPDATE lmk_video + SET comment_num = CASE id + <foreach collection="list" item="video"> + WHEN #{video.id} THEN #{video.countNum} + </foreach> + ELSE comment_num + END + WHERE id IN + <foreach collection="list" item="video" open="(" separator="," close=")"> + #{video.id} + </foreach> + </update> + </mapper> -- Gitblit v1.8.0