From 2a7b0a64b14b22ec45f8a0f6e4764bc3cd16919c Mon Sep 17 00:00:00 2001
From: peng <peng.com>
Date: 星期一, 27 十月 2025 17:08:24 +0800
Subject: [PATCH] 调整
---
framework/src/main/resources/mapper/lmk/VideoMapper.xml | 99 ++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 88 insertions(+), 11 deletions(-)
diff --git a/framework/src/main/resources/mapper/lmk/VideoMapper.xml b/framework/src/main/resources/mapper/lmk/VideoMapper.xml
index dc56251..6014df8 100644
--- a/framework/src/main/resources/mapper/lmk/VideoMapper.xml
+++ b/framework/src/main/resources/mapper/lmk/VideoMapper.xml
@@ -230,6 +230,7 @@
<if test="query.title != null and query.title != ''">AND LV.title LIKE CONCAT('%', #{query.title}, '%')</if>
<if test="query.authorId != null and query.authorId != ''">AND LV.author_id = #{query.authorId}</if>
<if test="query.status != null and query.status != ''">AND LV.status = #{query.status}</if>
+ order by LV.create_time DESC
</select>
<!-- todo 澶囦唤鍘熸湁鐨勫け鍘讳簡鏂囦欢-->
@@ -337,6 +338,7 @@
AND LM.id IS NOT NULL
ORDER BY
recommend DESC,
+ weight DESC,
create_time DESC
</select>
<select id="recommendVideoByVideoId" resultMap="WxResultMap">
@@ -661,8 +663,46 @@
collection="videoIds" open="(" close=")" separator="," item="videoId">#{videoId}</foreach>
</select>
+<!-- <select id="getAuthorVideoPage" resultMap="WxResultMap">-->
+<!-- SELECT-->
+<!-- LV.author_id,-->
+<!-- LV.cover_url,-->
+<!-- LV.video_fit,-->
+<!-- LV.video_duration,-->
+<!-- LV.video_file_key,-->
+<!-- LV.title,-->
+<!-- LV.goods_view_num,-->
+<!-- LV.goods_order_num,-->
+<!-- LV.recommend,-->
+<!-- LV.status,-->
+<!-- LV.play_num,-->
+<!-- LV.comment_num,-->
+<!-- LV.collect_num,-->
+<!-- LV.thumbs_up_num,-->
+<!-- LV.weight,-->
+<!-- LV.audit_pass_time,-->
+<!-- LV.update_time,-->
+<!-- LV.video_content_type,-->
+<!-- LV.video_type,-->
+<!-- LV.video_imgs,-->
+<!-- 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-->
+<!-- <if test="!query.authorSelf">-->
+<!-- AND LV.status = '1'-->
+<!-- </if>-->
+<!-- AND LV.author_id = #{query.authorId}-->
+<!-- AND LV.video_type = #{query.videoType}-->
+<!-- ORDER BY-->
+<!-- LV.collect_num DESC-->
+<!-- </select>-->
<select id="getAuthorVideoPage" resultMap="WxResultMap">
- SELECT
+ select * from (SELECT
LV.author_id,
LV.cover_url,
LV.video_fit,
@@ -672,7 +712,7 @@
LV.goods_view_num,
LV.goods_order_num,
LV.recommend,
- LV.status,
+ LV.STATUS,
LV.play_num,
LV.comment_num,
LV.collect_num,
@@ -684,20 +724,57 @@
LV.video_type,
LV.video_imgs,
LV.id,
- LM.nick_name as authorName,
- LM.face as authorAvatar
+ 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
- <if test="!query.authorSelf">
- AND LV.status = '1'
- </if>
- AND LV.author_id = #{query.authorId}
- AND LV.video_type = #{query.videoType}
+ LV.delete_flag = 0
+ <if test="!query.authorSelf">
+ AND LV.status = '1'
+ </if>
+ AND LV.author_id = #{query.authorId}
+ AND LV.video_type = #{query.videoType}
+ and lm.id IS NOT NULL
+ UNION ALL
+ SELECT
+ LV.author_id,
+ LV.cover_url,
+ LV.video_fit,
+ LV.video_duration,
+ LV.video_file_key,
+ LV.title,
+ LV.goods_view_num,
+ LV.goods_order_num,
+ LV.recommend,
+ LV.STATUS,
+ LV.play_num,
+ LV.comment_num,
+ LV.collect_num,
+ LV.thumbs_up_num,
+ LV.weight,
+ LV.audit_pass_time,
+ LV.update_time,
+ LV.video_content_type,
+ LV.video_type,
+ LV.video_imgs,
+ LV.id,
+ LM.nick_name AS authorName,
+ LM.avatar AS authorAvatar
+ FROM
+ lmk_video LV
+ LEFT JOIN li_admin_user LM ON LV.author_id = LM.id
+ WHERE
+ LV.delete_flag = 0
+ <if test="!query.authorSelf">
+ AND LV.status = '1'
+ </if>
+ AND LV.author_id = #{query.authorId}
+ AND LV.video_type = #{query.videoType}
+ and lm.id IS NOT NULL) t
ORDER BY
- LV.collect_num DESC
+ t.collect_num DESC
</select>
<select id="getAuthorCollectVideoPage" resultMap="WxResultMap">
--
Gitblit v1.8.0