xiaoyong931011
2021-12-22 6c920885a9bc407f2f05e204ae9769631c4c80e7
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
54
55
56
57
58
<?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.VideoMemberMapper">
 
    <select id="selectInfoByAccount" resultType="cc.mrbird.febs.video.entity.VideoMemberEntity">
        select * from video_member where account=#{account}  or invite_id=#{account}
    </select>
 
    <select id="selectInfoByInviteId" resultType="cc.mrbird.febs.video.entity.VideoMemberEntity">
        select * from video_member where invite_id=#{inviteId}
    </select>
 
    <select id="selectInfoByAccountAndPwd" resultType="cc.mrbird.febs.video.entity.VideoMemberEntity">
        select * from video_member where account=#{account} and password=#{password}
    </select>
 
    <select id="selectVideoMemberListInPage" resultType="cc.mrbird.febs.video.vo.AdminVideoMemberEntityVo">
        SELECT
            a.id id,
            a.account account,
            a.name name,
            a.is_vip isVip,
            a.account_type accountType,
            a.account_status accountStatus,
            a.created_time createdTime,
            b.buy_time buyTime,
            b.expire_time expireTime
        FROM video_member a
        left join video_vip_info b on a.id = b.member_id
        <where>
            <if test="record != null" >
                <if test="record.account!=null and record.account!=''">
                    and (a.account like concat('%',  #{record.account},'%')
                        or a.name like concat('%', #{record.account}, '%'))
                </if>
                <if test="record.isVip!=null">
                    and a.is_vip = #{record.isVip}
                </if>
                <if test="record.accountStatus != null" >
                    and a.account_status = #{record.accountStatus}
                </if>
            </if>
        </where>
        order by a.CREATED_TIME desc
    </select>
 
    <select id="getAppVersionListInPage" resultType="cc.mrbird.febs.video.entity.AppVersion">
        select a.* from app_version a
    </select>
 
    <select id="selectAdminVideoVipOrderInfoVoInPage" resultType="cc.mrbird.febs.video.vo.AdminVideoVipOrderInfoVo">
        SELECT
        a.*
        FROM video_vip_order_info a
        order by a.CREATED_TIME desc
    </select>
 
</mapper>