Helius
2020-06-19 dc0a33f391e23d4565e0cfd5d77a03784ec8c84d
src/main/resources/mapper/system/UserMapper.xml
@@ -94,7 +94,7 @@
            u.invite_id,
            u.system,
            u.type,
            u.agent_name,
            u.agent_name
    </sql>
    <select id="countUserDetail" parameterType="user" resultType="long">
@@ -167,13 +167,25 @@
    </select>
    <select id="selectAgentUserList" resultType="com.xcong.excoin.modules.agent.pojo.AgentUser">
        select *
        select
            a.user_id id,
            a.username account,
            a.agent_name name,
            a.invite_id,
            a.create_time,
            a.status,
            b.return_ratio,
            a.mobile telphone,
            c.referer_id refererId,
            c.certify_status
        from t_user a
        inner join agent_friend_relation b on a.user_id = b.user_id
        inner join member c on b.member_id = c.id
        <if test="record != null">
            <where>
                <if test="record.refererId!=null and record.refererId!=''">
                    find_in_set(#{record.refererId}, b.referer_ids)
                </if>
            </where>
        </if>
    </select>
@@ -181,4 +193,17 @@
    <select id="selectUserByInviteId" resultType="user">
        select * from t_user where invite_id=#{inviteId}
    </select>
    <select id="selectUserInfoById" resultType="user">
        select
            a.user_id,
            a.agent_name,
            a.username,
            a.mobile,
            a.invite_id,
            b.return_ratio
        from t_user a
        left join agent_friend_relation b on a.user_id=b.user_id
        where a.user_id=#{id}
    </select>
</mapper>