From 25ffa7f3d3c058390bcb6375d04ac358eaa1b91a Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Fri, 16 May 2025 16:51:00 +0800
Subject: [PATCH] feat(mall): 添加会员等级和分销等级字段

---
 src/main/java/cc/mrbird/febs/mall/entity/MallMember.java                       |    2 ++
 src/main/resources/mapper/modules/MallMemberMapper.xml                         |    6 ++++++
 src/main/resources/templates/febs/views/modules/mallMember/mallMemberList.html |   19 ++++++++++++-------
 3 files changed, 20 insertions(+), 7 deletions(-)

diff --git a/src/main/java/cc/mrbird/febs/mall/entity/MallMember.java b/src/main/java/cc/mrbird/febs/mall/entity/MallMember.java
index 62dab95..a942f25 100644
--- a/src/main/java/cc/mrbird/febs/mall/entity/MallMember.java
+++ b/src/main/java/cc/mrbird/febs/mall/entity/MallMember.java
@@ -115,6 +115,8 @@
     private BigDecimal prizeScore;
     @TableField(exist = false)
     private BigDecimal commission;
+    @TableField(exist = false)
+    private BigDecimal totalScore;
 
     @TableField(exist = false)
     private BigDecimal amount;
diff --git a/src/main/resources/mapper/modules/MallMemberMapper.xml b/src/main/resources/mapper/modules/MallMemberMapper.xml
index 34db249..1f1636b 100644
--- a/src/main/resources/mapper/modules/MallMemberMapper.xml
+++ b/src/main/resources/mapper/modules/MallMemberMapper.xml
@@ -45,11 +45,17 @@
     <select id="selectHappyMemberListInPage" resultType="cc.mrbird.febs.mall.entity.MallMember">
         SELECT
                a.*,
+               d.balance balance,
+               d.score score,
+               d.prize_score prizeScore,
+               d.commission commission,
+               d.total_score totalScore,
                b.name storeMasterName,
                c.name directorName
         FROM mall_member a
         left join happy_sale_level b on b.code = a.store_master
         left join happy_member_level c on c.code = a.director
+        left join mall_member_wallet d on d.member_id = a.id
         <where>
             <if test="record != null" >
                 <if test="record.birthdayQuery!=null">
diff --git a/src/main/resources/templates/febs/views/modules/mallMember/mallMemberList.html b/src/main/resources/templates/febs/views/modules/mallMember/mallMemberList.html
index 4890e74..1cd5474 100644
--- a/src/main/resources/templates/febs/views/modules/mallMember/mallMemberList.html
+++ b/src/main/resources/templates/febs/views/modules/mallMember/mallMemberList.html
@@ -381,15 +381,20 @@
                 cols: [[
                     {type: 'checkbox'},
                     {type: 'numbers', title: '', width: 80},
-                    // {title: '操作', toolbar: '#memberOption', minWidth: 200, align: 'center'},
-                    {field: 'name', title: '用户名', minWidth: 100,align:'left'},
-                    {field: 'realName', title: '真实姓名', minWidth: 100,align:'left'},
-                    {field: 'phone', title: '联系方式', minWidth: 150,align:'left'},
-                    {field: 'directorName', title: '会员等级', minWidth: 150,align:'left'},
-                    {field: 'storeMasterName', title: '分销等级', minWidth: 150,align:'left'},
-                    {field: 'inviteId', title: '邀请码', minWidth: 100,align:'left'},
                     {field: 'checkOrder', title: '状态', templet: '#accountStatusSwitch', minWidth: 100,align:'center'},
                     {field: 'checkOrder', title: '核销员', templet: '#checkOrderSwitch', minWidth: 100,align:'center'},
+                    // {title: '操作', toolbar: '#memberOption', minWidth: 200, align: 'center'},
+                    {field: 'name', title: '用户名', minWidth: 100,align:'center'},
+                    {field: 'realName', title: '真实姓名', minWidth: 100,align:'center'},
+                    {field: 'phone', title: '联系方式', minWidth: 150,align:'center'},
+                    {field: 'balance', title: '余额', minWidth: 150,align:'center'},
+                    {field: 'score', title: '会员经验', minWidth: 150,align:'center'},
+                    {field: 'prizeScore', title: '积分', minWidth: 150,align:'center'},
+                    {field: 'commission', title: '可用佣金', minWidth: 150,align:'center'},
+                    {field: 'totalScore', title: '总佣金', minWidth: 150,align:'center'},
+                    {field: 'directorName', title: '会员等级', minWidth: 150,align:'center'},
+                    {field: 'storeMasterName', title: '分销等级', minWidth: 150,align:'center'},
+                    {field: 'inviteId', title: '邀请码', minWidth: 100,align:'center'},
                     {field: 'createdTime', title: '注册时间', minWidth: 180,align:'center'},
                 ]]
             });

--
Gitblit v1.9.1