Helius
2020-06-15 0169b3c71efc064577a45c5058d458c9ef1cb94a
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
<?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="com.xcong.excoin.modules.agent.mapper.MemberMapper">
 
 
    <select id="selectMemberListInPage" resultType="com.xcong.excoin.modules.agent.entity.MemberEntity">
        select * from member
        <where>
            <if test="record != null">
                <if test="record.inviteId !=null and record.inviteId!=''">
                    and find_in_set(#{record.inviteId}, referer_ids)
                </if>
                <if test="record.startTime!=null">
                    and create_time >=#{record.startTime}
                </if>
                <if test="record.endTime!=null">
                    and #{record.endTime} >= create_time
                </if>
                <if test="record.account!=null and record.account!=''">
                    and (phone = #{record.account} or email = #{record.account} or invite_id=#{record.account})
                </if>
                <if test="record.accountStatus!=null">
                    and account_status = #{record.accountStatus}
                </if>
                <if test="record.accountType != null">
                    and account_type = #{record.accountType}
                </if>
                <if test="record.certifyStatus != null">
                    and certify_status = #{record.certifyStatus}
                </if>
            </if>
        </where>
        order by create_time desc
    </select>
 
 
    <select id="selectMemberByInviteIdAndRefererId" resultType="com.xcong.excoin.modules.agent.entity.MemberEntity">
        select * from member
        where invite_id=#{inviteId} and referer_id=#{refererId}
    </select>
 
</mapper>