From 43fa0ec4dc02c2bb1a2ac5e9eea81cae4d2cb11d Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Fri, 17 Dec 2021 16:08:18 +0800
Subject: [PATCH] Merge branch 'master' of http://120.27.238.55:7000/r/xc-video

---
 src/main/resources/mapper/video/VideoMasterInfoMapper.xml |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/mapper/video/VideoMasterInfoMapper.xml b/src/main/resources/mapper/video/VideoMasterInfoMapper.xml
index d22497f..1332c0e 100644
--- a/src/main/resources/mapper/video/VideoMasterInfoMapper.xml
+++ b/src/main/resources/mapper/video/VideoMasterInfoMapper.xml
@@ -32,6 +32,8 @@
             <result property="thumb" column="item_thumb" />
             <result property="sourceId" column="source_id" />
             <result property="sourceName" column="sourceName" />
+            <result property="timeLength" column="item_time_length" />
+            <result property="seq" column="seq" />
         </collection>
     </resultMap>
 
@@ -42,9 +44,34 @@
             b.name,
             b.thumb item_thumb,
             b.source_id,
+            b.time_length item_time_length,
+            b.seq,
             c.name sourceName
         from video_master_info a, video_master_items b, video_master_source c
         where a.id=b.master_id and a.id=#{id} and b.source_id=c.id
     </select>
 
+    <select id="selectVideoListInPage" resultType="cc.mrbird.febs.video.vo.VideoListVo">
+        select
+            a.*,
+            count(b.id) itemCnt,
+            (select c.time_length from video_master_source c where b.source_id=c.id limit 1) timeLength
+        from video_master_info a
+            inner join video_master_items b on a.id=b.master_id
+            inner join video_master_data d on a.id=d.master_id
+        <where>
+                1=1
+            <if test="record.isUp != null">
+                and a.is_up = #{record.isUp}
+            </if>
+            <if test="record.isFree != null">
+                and a.is_free = #{record.isFree}
+            </if>
+            <if test="record.query != null and record.query != ''">
+                and title like concat('%', #{record.query}, '%')
+            </if>
+        </where>
+        group by a.id
+        order by d.play_cnt desc, a.created_time desc
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.1