From a87ea6e545a5617f8752c669898f6a7225a38a14 Mon Sep 17 00:00:00 2001
From: peng <peng.com>
Date: 星期三, 20 八月 2025 11:25:51 +0800
Subject: [PATCH] 添加枚举类型

---
 framework/src/main/resources/mapper/lmk/VideoMapper.xml |  174 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 172 insertions(+), 2 deletions(-)

diff --git a/framework/src/main/resources/mapper/lmk/VideoMapper.xml b/framework/src/main/resources/mapper/lmk/VideoMapper.xml
index ca87dfc..58a6600 100644
--- a/framework/src/main/resources/mapper/lmk/VideoMapper.xml
+++ b/framework/src/main/resources/mapper/lmk/VideoMapper.xml
@@ -232,8 +232,147 @@
             <if test="query.status != null and query.status != ''">AND LV.status = #{query.status}</if>
     </select>
 
-
+<!-- todo 澶囦唤鍘熸湁鐨勫け鍘讳簡鏂囦欢-->
+<!--    <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_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.create_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 AND LV.status = '1' AND LV.video_type = #{query.videoType}-->
+<!--        ORDER BY-->
+<!--            LV.create_time DESC-->
+<!--    </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_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.create_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
+          AND LV.STATUS = '1'
+          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.create_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
+          AND LV.STATUS = '1'
+          AND LV.video_type = #{query.videoType}
+          AND lm.id IS NOT NULL
+        ORDER BY
+            create_time DESC
+    </select>
+    <select id="recommendVideoByVideoId" 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.create_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 AND LV.status = '1' AND LV.id = #{query.videoId}
+        ORDER BY
+            LV.create_time DESC
+    </select>
+    <select id="recommendVideoList" resultMap="WxResultMap">
         SELECT
             LV.author_id,
             LV.cover_url,
@@ -488,6 +627,25 @@
                FROM lmk_my_subscribe WHERE user_id = #{currentUserId} AND subscribe_user_id = #{authorId} AND delete_flag = 0) as hasSub
         FROM
              li_member LM
+                 LEFT JOIN lmk_video_account LVA ON LM.id = LVA.user_id
+        WHERE
+              LM.id = #{authorId} AND LM.delete_flag = 0
+    </select>
+    <select id="getAuthorInfoAdmin" resultType="cn.lili.modules.lmk.domain.vo.VideoAccountVO">
+        SELECT
+               LM.id as userId,
+               LM.nick_name as nickName,
+               LM.avatar as avatar,
+               LVA.motto,
+               (SELECT COUNT(*) FROM lmk_my_subscribe WHERE subscribe_user_id = #{authorId} AND delete_flag = 0) as fansNum,
+               (SELECT COUNT(*) FROM lmk_my_subscribe WHERE user_id = #{authorId} AND delete_flag = 0) as subNum,
+               (SELECT CASE
+                           WHEN id IS NOT NULL THEN 1
+                           ELSE 0
+                           END
+               FROM lmk_my_subscribe WHERE user_id = #{currentUserId} AND subscribe_user_id = #{authorId} AND delete_flag = 0) as hasSub
+        FROM
+            li_admin_user LM
                  LEFT JOIN lmk_video_account LVA ON LM.id = LVA.user_id
         WHERE
               LM.id = #{authorId} AND LM.delete_flag = 0
@@ -905,5 +1063,17 @@
             LV.delete_flag = 0
         LIMIT #{start}, #{pageSize}
     </select>
-
+    <resultMap id="videoUserBaseInfoMap" type="cn.lili.modules.lmk.domain.vo.VideoUserBaseInfo">
+    <result property="avatar" column="avatar"/>
+    <result property="nickName" column="nick_name"/>
+    </resultMap>
+    <select id="getVideoSysUserBaseInfo" resultMap="videoUserBaseInfoMap">
+        SELECT nick_name ,avatar FROM li_admin_user
+        WHERE id = #{id}
+    </select>
+    <select id="getVideoMemUserBaseInfo" resultMap="videoUserBaseInfoMap">
+        SELECT nick_name, face AS avatar
+        FROM li_member
+        WHERE id = #{id}
+    </select>
 </mapper>

--
Gitblit v1.8.0