From fa91cc62d16b55c99d4cf6451ac6e2f1e0031dd5 Mon Sep 17 00:00:00 2001 From: xiaoyong931011 <15274802129@163.com> Date: Sat, 15 May 2021 18:35:15 +0800 Subject: [PATCH] 20210515 云顶 --- src/main/resources/mapper/member/MemberDao.xml | 88 ++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 85 insertions(+), 3 deletions(-) diff --git a/src/main/resources/mapper/member/MemberDao.xml b/src/main/resources/mapper/member/MemberDao.xml index a549429..838f835 100644 --- a/src/main/resources/mapper/member/MemberDao.xml +++ b/src/main/resources/mapper/member/MemberDao.xml @@ -3,10 +3,92 @@ <mapper namespace="com.xcong.excoin.modules.member.dao.MemberDao"> <select id="selectMemberInfoByAccount" resultType="com.xcong.excoin.modules.member.entity.MemberEntity"> - select * from member where phone=#{account} or email=#{account} + select * from member where phone=#{account} or email=#{account} or invite_id=#{account} </select> - <select id="selectMemberInfoByRefererId" resultType="com.xcong.excoin.modules.member.entity.MemberEntity"> - select * from member where invite_id=#{refererId} + <select id="selectMemberInfoByInviteId" resultType="com.xcong.excoin.modules.member.entity.MemberEntity"> + select * from member where invite_id=#{inviteId} + </select> + + <select id="selectFriendRelationUserByMemberId" parameterType="long" resultType="com.xcong.excoin.modules.member.parameter.vo.NeedMoneyMemberVo"> + SELECT + t1.id memberId, + t1.invite_id inviteId, + t2.referer_id referenceId, + t2.return_ratio returnRatio, + t2.level_id levelId, + t2.fee_is_self feeIsSelf + FROM + member t1 + INNER JOIN agent_friend_relation t2 ON t1.id = t2.member_id + WHERE + t1.id = #{memberId} + AND t2.referer_id IS NOT NULL + </select> + + <select id="selectAllNeedMoneyMember" parameterType="map" resultType="com.xcong.excoin.modules.member.parameter.vo.NeedMoneyMemberVo"> + SELECT + t1.id memberId, + t1.invite_id inviteId, + t2.referer_id referenceId, + t2.return_ratio returnRatio, + t2.level_id levelId, + t2.fee_is_self feeIsSelf + FROM + member t1 + INNER JOIN agent_friend_relation t2 ON t1.id = t2.member_id + WHERE + t2.referer_id IS NOT NULL + AND t1.invite_id IN + <foreach collection = "list" item = "item" separator="," open = "(" close = ")" > + #{item} + </foreach > + </select> + + + <select id="selectAllMember" resultType="com.xcong.excoin.modules.member.entity.MemberEntity"> + select * from member + </select> + + <resultMap id="memberAgentMap" type="com.xcong.excoin.modules.member.entity.MemberEntity"> + <id property="id" column="id" /> + + <association property="ydBasicLevelSettingEntity" javaType="com.xcong.excoin.modules.yunding.entity.YdBasicLevelSettingEntity"> + <result property="level" column="level"/> + <result property="usdtRatio" column="usdt_ratio" /> + <result property="xchRatio" column="xch_ratio" /> + </association> + </resultMap> + + <select id="selectYdParentAgent" resultMap="memberAgentMap"> + select a.*, b.level, b.usdt_ratio, b.xch_ratio from member a + inner join yd_basic_level_setting b on a.agent_level=b.id + where a.invite_id!='rxadr3' and a.invite_id in + <foreach collection = "list" item = "item" separator="," open = "(" close = ")" > + #{item} + </foreach > + order by id desc + </select> + + <select id="selectMemberByInviteIds" resultType="com.xcong.excoin.modules.member.entity.MemberEntity"> + select * from member + where invite_id != 'rxadr3' and invite_id IN + <foreach collection = "list" item = "item" separator="," open = "(" close = ")" > + #{item} + </foreach > + </select> + + <select id="selectMemberByRefererId" resultType="com.xcong.excoin.modules.member.entity.MemberEntity"> + select * from member where referer_id=#{refererId} and invite_id!=#{refererId} + </select> + + <select id="selectTeamAgentList" resultType="com.xcong.excoin.modules.member.entity.MemberEntity"> + select * from member a + where (find_in_set(#{inviteId}, a.referer_ids) or invite_id=#{inviteId}) + and agent_level in (1, 2) + </select> + + <select id="selectPartnerMemberList" resultType="com.xcong.excoin.modules.member.entity.MemberEntity"> + select * from member where is_trader=1 </select> </mapper> \ No newline at end of file -- Gitblit v1.9.1