From 817c7de04cb6b74164a42ed0e6050ae5b91b0ef1 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期四, 29 五月 2025 18:14:00 +0800
Subject: [PATCH] 视频评论增加被回复人头像字段
---
framework/src/main/resources/mapper/lmk/VideoMapper.xml | 78 +++++++++++++++++++++++++++++++++++++++
1 files changed, 78 insertions(+), 0 deletions(-)
diff --git a/framework/src/main/resources/mapper/lmk/VideoMapper.xml b/framework/src/main/resources/mapper/lmk/VideoMapper.xml
index 417ca5e..be18336 100644
--- a/framework/src/main/resources/mapper/lmk/VideoMapper.xml
+++ b/framework/src/main/resources/mapper/lmk/VideoMapper.xml
@@ -13,6 +13,7 @@
<result column="title" property="title" />
<result column="goods_id" property="goodsId" />
<result column="goods_view_num" property="goodsViewNum" />
+ <result column="video_duration" property="videoDuration" />
<result column="goods_order_num" property="goodsOrderNum" />
<result column="recommend" property="recommend" />
<result column="status" property="status" />
@@ -24,12 +25,27 @@
<result column="update_time" property="updateTime" />
</resultMap>
+ <!-- 寰俊鎺ㄨ崘瑙嗛 -->
+ <resultMap id="WxResultMap" type="cn.lili.modules.lmk.domain.vo.WxVideoVO">
+ <id column="id" property="id"/>
+ <result column="author_id" property="authorId" />
+ <result column="authorName" property="authorName" />
+ <result column="authorAvatar" property="authorAvatar" />
+ <result column="cover_url" property="coverUrl" />
+ <result column="video_file_key" property="videoFileKey" />
+ <result column="video_fit" property="videoFit" />
+ <result column="title" property="title" />
+ <result column="collect_num" property="collectNum" />
+ <result column="comment_num" property="commentNum" />
+ </resultMap>
+
<select id="getById" resultMap="BaseResultMap">
SELECT
LV.author_id,
LV.cover_url,
LV.video_fit,
+ LV.video_duration,
LV.video_file_key,
LV.title,
LV.goods_id,
@@ -58,6 +74,7 @@
LV.author_id,
LV.cover_url,
LV.video_fit,
+ LV.video_duration,
LV.video_file_key,
LV.title,
LV.goods_id,
@@ -86,6 +103,7 @@
LV.author_id,
LV.cover_url,
LV.video_fit,
+ LV.video_duration,
LV.video_file_key,
LV.title,
LV.goods_id,
@@ -119,4 +137,64 @@
<if test="query.status != null and query.status != ''">AND LV.status = #{query.status}</if>
</select>
+
+ <select id="recommendVideo" resultMap="WxResultMap">
+ SELECT
+ LV.author_id,
+ LV.cover_url,
+ LV.video_fit,
+ LV.video_duration,
+ LV.video_file_key,
+ LV.title,
+ LV.goods_id,
+ LV.goods_view_num,
+ LV.goods_order_num,
+ LV.recommend,
+ LV.status,
+ LV.play_num,
+ LV.comment_num,
+ LV.collect_num,
+ LV.weight,
+ LV.audit_pass_time,
+ LV.update_time,
+ LV.id,
+ LM.nick_name as authorName,
+ LM.face as authorAvatar
+ FROM
+ lmk_video LV
+ LEFT JOIN li_member LM ON LV.author_id = LM.id
+ WHERE
+ LV.delete_flag = 0 AND LV.status = '1'
+ </select>
+
+
+ <update id="updateCollectNumBatch">
+ UPDATE lmk_video
+ SET collect_num = CASE id
+ <foreach collection="list" item="video">
+ WHEN #{video.id} THEN #{video.countNum}
+ </foreach>
+ ELSE collect_num
+ END
+ WHERE id IN
+ <foreach collection="list" item="video" open="(" separator="," close=")">
+ #{video.id}
+ </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