From 16b9e8b2690e8cc2b7f2262d1fa2ec65ee5dc590 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Mon, 17 Apr 2023 16:27:34 +0800
Subject: [PATCH] 只针对一星会员做修改: 按购买业绩(不按权益积分)每天静态释0.6%~1.2%

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

diff --git a/src/main/resources/mapper/modules/MallMemberMapper.xml b/src/main/resources/mapper/modules/MallMemberMapper.xml
index a8157bf..9a6e4ed 100644
--- a/src/main/resources/mapper/modules/MallMemberMapper.xml
+++ b/src/main/resources/mapper/modules/MallMemberMapper.xml
@@ -12,6 +12,8 @@
                IFNULL(c.commission,0) commission,
                IFNULL(c.star,0) star,
                IFNULL(c.total_score,0) totalScore,
+               IFNULL(c.voucher_cnt,0) voucherCnt,
+               IFNULL(c.voucher_amount,0) voucherAmount,
                d.description levelName
         FROM mall_member m
         left join mall_member a on m.referrer_id = a.invite_id
@@ -272,7 +274,7 @@
         SELECT a.id,d.code levelCode
         FROM mall_member a
                  LEFT JOIN data_dictionary_custom d on d.code = a.level
-        where a.id = #{id} and d.type = 'AGENT_LEVEL'
+        where a.id = #{id} and d.type = 'AGENT_LEVEL_REQUIRE'
         GROUP BY a.id
     </select>
 
@@ -431,4 +433,21 @@
         from mall_member
         where store_master = #{state}
     </select>
+
+    <select id="selectByRole" resultType="cc.mrbird.febs.mall.entity.MallMember">
+        select * from mall_member
+        <where>
+            <if test="type == 3">
+                and creater = #{state}
+            </if>
+            <if test="type == 4">
+                and partner = #{state}
+            </if>
+        </where>
+    </select>
+
+    <select id="selectByLevel" 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