Helius
2021-12-22 ac0bc5b39477de418b3c43eb40928310effa6114
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cc.mrbird.febs.video.mapper.VideoCollectionMapper">
 
    <select id="selectApiVideoCollectionInPage" resultType="cc.mrbird.febs.video.vo.ApiMyVideoCollectionVo">
        select
        a.video_id id,
        b.title title,
        b.intro intro,
        b.thumb thumb
        from video_collection a
        left join video_master_info b on a.video_id = b.id
        <where>
            <if test="record.memberId != null">
                and a.member_id=#{record.memberId}
            </if>
        </where>
        order by a.created_time desc
    </select>
 
    <select id="selectApiMyVideoHistoryInPage" resultType="cc.mrbird.febs.video.vo.ApiMyVideoHistoryVo">
        select
        a.id id,
        a.video_id videoId,
        a.updated_time updatedTime,
        b.title title,
        b.intro intro,
        b.thumb thumb,
        c.name name,
        c.video_url videoUrl,
        c.source_id sourceId
        from video_history a
        left join video_master_info b on a.video_id = b.id
        left join video_master_items c on a.video_item_id = c.id
        <where>
            <if test="record.memberId != null">
                and a.member_id=#{record.memberId}
            </if>
        </where>
        order by a.created_time desc
    </select>
 
 
 
    <select id="selectVideoCollectionByVideoIdAndMemberId" resultType="cc.mrbird.febs.video.entity.VideoCollectionEntity">
        select
        a.*
        from video_collection a
        where a.member_id = #{memberId}
            and a.video_id = #{videoId}
    </select>
 
</mapper>