From 38a7fc9d1a7a421741ef641303ac8d2a78d997f5 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Fri, 17 Jun 2022 17:57:53 +0800
Subject: [PATCH] fix

---
 src/main/resources/mapper/modules/MallMemberMapper.xml |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/main/resources/mapper/modules/MallMemberMapper.xml b/src/main/resources/mapper/modules/MallMemberMapper.xml
index 5ce313a..9c42c9d 100644
--- a/src/main/resources/mapper/modules/MallMemberMapper.xml
+++ b/src/main/resources/mapper/modules/MallMemberMapper.xml
@@ -3,7 +3,7 @@
 <mapper namespace="cc.mrbird.febs.mall.mapper.MallMemberMapper">
 
     <select id="selectMallMemberListInPage" resultType="cc.mrbird.febs.mall.entity.MallMember">
-        SELECT m.*,a.name referrerName,IFNULL(c.balance,0) balance,IFNULL(c.score,0) score,IFNULL(c.prize_score,0) prizeScore
+        SELECT m.*,a.name referrerName,IFNULL(c.balance,0) balance,IFNULL(c.score,0) score,IFNULL(c.prize_score,0) prizeScore,IFNULL(c.commission,0) commission
         ,d.description levelName
         FROM mall_member m
         left join mall_member a on m.referrer_id = a.invite_id
@@ -27,6 +27,9 @@
                 </if>
                 <if test="record.accountType != null" >
                     and m.account_type = #{record.accountType}
+                </if>
+                <if test="record.level!=null and record.level!=''">
+                    and m.level=#{record.level}
                 </if>
             </if>
         </where>
@@ -81,7 +84,7 @@
             (select sum(e.amount)
              from mall_order_info e
                       inner join mall_member b on e.member_id=b.ID
-                      inner join mall_order_item c on e.id = c.order_id and c.is_normal=2
+                      inner join mall_order_item c on e.id = c.order_id -- and c.is_normal=2
              where e.status in (2, 3, 4) and e.order_type=1 and (b.invite_id=a.invite_id or b.referrer_id=a.invite_id)) amount,
             (select count(1) from mall_member e
                       inner join mall_order_info b on e.id=b.member_id and b.status in (2, 3, 4)
@@ -392,4 +395,9 @@
             </if>
         </where>
     </select>
+
+    <select id="selectMemberWithLevel" resultType="cc.mrbird.febs.mall.entity.MallMember">
+        select * from mall_member
+        where level=#{level}
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.1