peng
2025-10-27 2a7b0a64b14b22ec45f8a0f6e4764bc3cd16919c
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 备份原有的失去了文件-->
@@ -300,7 +301,7 @@
            LV.delete_flag = 0
          AND LV.STATUS = '1'
          AND LV.video_type = #{query.videoType}
          AND lm.id IS NOT NULL
          AND LM.id IS NOT NULL
        UNION ALL
        SELECT
            LV.author_id,
@@ -334,8 +335,10 @@
            LV.delete_flag = 0
          AND LV.STATUS = '1'
          AND LV.video_type = #{query.videoType}
          AND lm.id IS NOT NULL
          AND LM.id IS NOT NULL
        ORDER BY
            recommend DESC,
            weight DESC,
            create_time DESC
    </select>
    <select id="recommendVideoByVideoId" resultMap="WxResultMap">
@@ -660,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,
@@ -671,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,
@@ -683,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">