From 81d826f455491f18f64c4032fc07be5c6abdd009 Mon Sep 17 00:00:00 2001 From: xiaoyong931011 <15274802129@163.com> Date: Wed, 29 Sep 2021 17:03:31 +0800 Subject: [PATCH] 20210928 --- src/main/resources/mapper/modules/MallMemberMapper.xml | 39 ++++++++++++++++++++++++++++++++++++--- 1 files changed, 36 insertions(+), 3 deletions(-) diff --git a/src/main/resources/mapper/modules/MallMemberMapper.xml b/src/main/resources/mapper/modules/MallMemberMapper.xml index cc2fdca..d4476c3 100644 --- a/src/main/resources/mapper/modules/MallMemberMapper.xml +++ b/src/main/resources/mapper/modules/MallMemberMapper.xml @@ -13,6 +13,7 @@ and ( m.phone like concat('%', #{record.account},'%') or m.email like concat('%', #{record.account},'%') + or m.bind_phone like concat('%', #{record.account},'%') or m.invite_id like concat('%', #{record.account},'%') ) </if> @@ -28,7 +29,8 @@ </select> <select id="getMallMemberInfoById" resultType="cc.mrbird.febs.mall.vo.MallMemberVo"> - SELECT a.name, + SELECT a.id, + a.name, a.phone, a.email, a.sex, @@ -36,12 +38,15 @@ a.level, a.account_status, a.CREATED_TIME, - c.balance, + IFNULL(c.balance,0) balance, + d.description levelName, b.name FROM mall_member a LEFT JOIN mall_member b on a.referrer_id = b.invite_id LEFT JOIN mall_member_wallet c on c.member_id = a.id + LEFT JOIN data_dictionary_custom d on d.code = a.level where a.id = #{id} + GROUP BY a.id </select> <select id="selectInfoByAccount" resultType="cc.mrbird.febs.mall.entity.MallMember"> @@ -158,7 +163,7 @@ <select id="selectMemberParentAgentList" resultType="cc.mrbird.febs.mall.entity.MallMember"> select * from mall_member - where level not in ('ZERO_LEVEL', 'FIRST_LEVEL') and invteId!=#{refererId} and invite_id IN + where level not in ('ZERO_LEVEL', 'FIRST_LEVEL') and invite_id!=#{refererId} and invite_id IN <foreach collection = "list" item = "item" separator="," open = "(" close = ")" > #{item} </foreach > @@ -207,4 +212,32 @@ <select id="getAppVersionListInPage" resultType="cc.mrbird.febs.mall.entity.AppVersion"> select a.* from app_version a </select> + + <select id="selectByIdAndNoLevel" resultType="cc.mrbird.febs.mall.entity.MallMember"> + select * from mall_member where referrer_id=#{refererId} and level != #{level} + </select> + + <select id="selectMallMemberByInviteIdAndLevel" resultType="cc.mrbird.febs.mall.entity.MallMember"> + SELECT + m.*, b. + VALUE + + FROM + mall_member m + LEFT JOIN data_dictionary_custom b ON m. LEVEL = b. CODE + WHERE + find_in_set(#{inviteId}, m.referrer_ids) + AND b.type = 'AGENT_LEVEL' + AND b.VALUE > ( + SELECT + VALUE + FROM + data_dictionary_custom a + WHERE + a. CODE = #{level} + AND a.type = 'AGENT_LEVEL' + ) + GROUP BY + m.id + </select> </mapper> \ No newline at end of file -- Gitblit v1.9.1