From 7bd16e795f4771d3114b8ed63640622ac35feffd Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Tue, 28 Sep 2021 16:48:28 +0800
Subject: [PATCH] fix
---
src/main/resources/mapper/modules/MallMemberMapper.xml | 43 +++++++++++++++++++++++++++++++++++++++++--
1 files changed, 41 insertions(+), 2 deletions(-)
diff --git a/src/main/resources/mapper/modules/MallMemberMapper.xml b/src/main/resources/mapper/modules/MallMemberMapper.xml
index 080400a..81c198b 100644
--- a/src/main/resources/mapper/modules/MallMemberMapper.xml
+++ b/src/main/resources/mapper/modules/MallMemberMapper.xml
@@ -115,7 +115,21 @@
</select>
<select id="getAgentListInPage" resultType="cc.mrbird.febs.mall.vo.AdminAgentVo">
- SELECT m.*,a.description levelName FROM mall_member m
+
+ SELECT m.*,a.description levelName,
+ ifnull((
+ SELECT
+ sum(b.amount)
+ FROM
+ mall_member e
+ INNER JOIN mall_order_info b ON e.id = b.member_id
+ AND b. STATUS = 4
+ WHERE
+ e.invite_id = m.invite_id
+ OR e.referrer_id = m.invite_id
+ or find_in_set(m.invite_id, e.referrer_ids)
+ ),0) amount
+ FROM mall_member m
left join data_dictionary_custom a on a.code = m.level
<where>
<if test="record != null" >
@@ -144,7 +158,7 @@
<select id="selectMemberParentAgentList" resultType="cc.mrbird.febs.mall.entity.MallMember">
select * from mall_member
- where level != 'FIRST_LEVEL' and invite_id IN
+ where level not in ('ZERO_LEVEL', 'FIRST_LEVEL') and invite_id IN
<foreach collection = "list" item = "item" separator="," open = "(" close = ")" >
#{item}
</foreach >
@@ -167,5 +181,30 @@
select m.*,a.description levelName from mall_member m
left join data_dictionary_custom a on a.code = m.level
where find_in_set(#{record.inviteId}, m.referrer_ids)
+ GROUP BY m.id
+ ORDER BY
+ m.CREATED_TIME DESC
+ </select>
+
+ <select id="getRankAwardListInPage" resultType="cc.mrbird.febs.mall.vo.AdminRankAwardVo">
+ select a.* from data_dictionary_custom a where a.type = 'RANK_AWARD' or a.type = 'RANK_AWARD_SETTING'
+ </select>
+
+
+ <select id="getAgentTeamAmountByInviteId" resultType="java.math.BigDecimal">
+ SELECT
+ ifnull(sum(b.amount),0)
+ FROM
+ mall_member e
+ INNER JOIN mall_order_info b ON e.id = b.member_id
+ AND b. STATUS = 4
+ WHERE
+ e.invite_id = #{inviteId}
+ OR e.referrer_id = #{inviteId}
+ or find_in_set(#{inviteId}, e.referrer_ids)
+ </select>
+
+ <select id="getAppVersionListInPage" resultType="cc.mrbird.febs.mall.entity.AppVersion">
+ select a.* from app_version a
</select>
</mapper>
\ No newline at end of file
--
Gitblit v1.9.1