From 02184fd86a8ef854d087d5c919151bbdf092efef Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Thu, 16 Jun 2022 15:28:58 +0800
Subject: [PATCH] fix

---
 src/main/resources/templates/index.html                                        |    2 
 src/test/java/cc/mrbird/febs/AgentTest.java                                    |   26 +++---
 src/main/java/cc/mrbird/febs/mall/entity/MallMoneyFlow.java                    |    2 
 src/test/java/cc/mrbird/febs/ProfitTest.java                                   |   11 ++
 src/main/java/cc/mrbird/febs/common/runner/FebsStartedUpRunner.java            |    2 
 src/main/resources/mapper/modules/MallMemberMapper.xml                         |    5 +
 src/main/resources/templates/error/404.html                                    |    2 
 src/main/java/cc/mrbird/febs/mall/dto/MoneyFlowDto.java                        |    2 
 src/main/java/cc/mrbird/febs/mall/vo/MoneyFlowVo.java                          |    2 
 src/main/resources/templates/febs/views/modules/mallMember/moneyFlow.html      |    2 
 src/main/resources/templates/febs/views/modules/mallMember/agentList.html      |    8 +-
 src/main/resources/templates/febs/views/modules/mallMember/mallMemberList.html |   18 ++++
 src/main/resources/mapper/modules/MallGoodsMapper.xml                          |    4 
 src/main/resources/templates/error/403.html                                    |    2 
 src/main/java/cc/mrbird/febs/common/enumerates/MoneyFlowTypeEnum.java          |    4 
 src/main/resources/templates/febs/views/modules/mallMember/moneyFlowList.html  |    4 
 src/main/java/cc/mrbird/febs/mall/entity/MallMember.java                       |    2 
 src/main/java/cc/mrbird/febs/mall/service/impl/MemberProfitServiceImpl.java    |   48 +++++++++---
 src/main/java/cc/mrbird/febs/pay/service/impl/PayServiceImpl.java              |    2 
 src/main/resources/templates/error/500.html                                    |    2 
 src/main/resources/templates/febs/views/layout.html                            |    2 
 src/main/resources/templates/febs/views/login.html                             |   67 ----------------
 22 files changed, 105 insertions(+), 114 deletions(-)

diff --git a/src/main/java/cc/mrbird/febs/common/enumerates/MoneyFlowTypeEnum.java b/src/main/java/cc/mrbird/febs/common/enumerates/MoneyFlowTypeEnum.java
index ab749bf..78830dd 100644
--- a/src/main/java/cc/mrbird/febs/common/enumerates/MoneyFlowTypeEnum.java
+++ b/src/main/java/cc/mrbird/febs/common/enumerates/MoneyFlowTypeEnum.java
@@ -4,7 +4,7 @@
 
 /**
  *
- * 1-静态收益 2-直推奖 3-代理收益 4-排名收益 5-董事收益 6-社区点补 7-一代收益 8-提现 9-转增 10-支付 11-退款
+ * 1-静态收益 2-直推奖 3-代理收益 4-排名收益 5-总监收益 6-社区点补 7-一代收益 8-提现 9-转增 10-支付 11-退款
  * @author wzy
  * @date 2021-09-24
  **/
@@ -30,7 +30,7 @@
     RANK_BONUS(4),
 
     /**
-     * 董事收益
+     * 总监收益
      */
     DIRECTOR_BONUS(5),
 
diff --git a/src/main/java/cc/mrbird/febs/common/runner/FebsStartedUpRunner.java b/src/main/java/cc/mrbird/febs/common/runner/FebsStartedUpRunner.java
index e986f90..3248d25 100644
--- a/src/main/java/cc/mrbird/febs/common/runner/FebsStartedUpRunner.java
+++ b/src/main/java/cc/mrbird/febs/common/runner/FebsStartedUpRunner.java
@@ -63,7 +63,7 @@
             log.info("/ /`  / / \\ | |\\/| | |_) | |   | |_   | |  | |_  ");
             log.info("\\_\\_, \\_\\_/ |_|  | |_|   |_|__ |_|__  |_|  |_|__ ");
             log.info("                                                      ");
-            log.info("全民商城 权限系统启动完毕,地址:{}", url);
+            log.info("中基商城 权限系统启动完毕,地址:{}", url);
 
             boolean auto = febsProperties.isAutoOpenBrowser();
             if (auto && StringUtils.equalsIgnoreCase(active, FebsConstant.DEVELOP)) {
diff --git a/src/main/java/cc/mrbird/febs/mall/dto/MoneyFlowDto.java b/src/main/java/cc/mrbird/febs/mall/dto/MoneyFlowDto.java
index fd26c51..1d627b4 100644
--- a/src/main/java/cc/mrbird/febs/mall/dto/MoneyFlowDto.java
+++ b/src/main/java/cc/mrbird/febs/mall/dto/MoneyFlowDto.java
@@ -19,7 +19,7 @@
     @ApiModelProperty(value = "页码", example = "1")
     private Integer pageNum;
 
-    @ApiModelProperty(value = "类型 1-静态收益 2-直推奖 3-代理收益 4-排名收益 5-董事收益 6-社区点补 7-一代收益 8-提现 9-转增 10-支付 11-退款")
+    @ApiModelProperty(value = "类型 1-静态收益 2-直推奖 3-代理收益 4-排名收益 5-总监收益 6-社区点补 7-一代收益 8-提现 9-转增 10-支付 11-退款")
     private Integer type;
 
     @ApiModelProperty(value = "类型 1-全部 2-支出 3-收入")
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 0deba36..61a5590 100644
--- a/src/main/java/cc/mrbird/febs/mall/entity/MallMember.java
+++ b/src/main/java/cc/mrbird/febs/mall/entity/MallMember.java
@@ -112,6 +112,8 @@
     private BigDecimal score;
     @TableField(exist = false)
     private BigDecimal prizeScore;
+    @TableField(exist = false)
+    private BigDecimal commission;
 
     @TableField(exist = false)
     private BigDecimal amount;
diff --git a/src/main/java/cc/mrbird/febs/mall/entity/MallMoneyFlow.java b/src/main/java/cc/mrbird/febs/mall/entity/MallMoneyFlow.java
index 44112ac..5d43427 100644
--- a/src/main/java/cc/mrbird/febs/mall/entity/MallMoneyFlow.java
+++ b/src/main/java/cc/mrbird/febs/mall/entity/MallMoneyFlow.java
@@ -19,7 +19,7 @@
     private BigDecimal amount;
 
     /**
-     * 类型 1-静态收益 2-直推奖 3-代理收益 4-排名收益 5-董事收益 6-社区点补 7-一代收益 8-提现 9-转增
+     * 类型 1-静态收益 2-直推奖 3-代理收益 4-排名收益 5-总监收益 6-社区点补 7-一代收益 8-提现 9-转增
      */
     private Integer type;
 
diff --git a/src/main/java/cc/mrbird/febs/mall/service/impl/MemberProfitServiceImpl.java b/src/main/java/cc/mrbird/febs/mall/service/impl/MemberProfitServiceImpl.java
index 1538394..c170ad3 100644
--- a/src/main/java/cc/mrbird/febs/mall/service/impl/MemberProfitServiceImpl.java
+++ b/src/main/java/cc/mrbird/febs/mall/service/impl/MemberProfitServiceImpl.java
@@ -26,9 +26,7 @@
 
 import java.math.BigDecimal;
 import java.math.RoundingMode;
-import java.util.Date;
-import java.util.List;
-import java.util.Objects;
+import java.util.*;
 
 /**
  * @author wzy
@@ -72,6 +70,8 @@
         DataDictionaryCustom dic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(DataDictionaryEnum.STATIC_BONUS.getType(), DataDictionaryEnum.STATIC_BONUS.getCode());
         BigDecimal perProfit = totalIncome.multiply(new BigDecimal(dic.getValue()).divide(BigDecimal.valueOf(100), 2, RoundingMode.HALF_UP));
 
+        Map<Long, List<Map<String, Object>>> map = new HashMap<>();
+        Map<Long, BigDecimal> goodsProp = new HashMap<>();
         for (MallMember member : members) {
             List<MallGoods> goodsList = mallGoodsMapper.selectOrderGoodsList(member.getId(), profitDate);
 
@@ -84,16 +84,40 @@
                     continue;
                 }
 
-                BigDecimal goodsProfit = goods.getStaticProp().multiply(perProfit);
-
-                int reduce = walletService.reduce(goodsProfit, member.getId(), "score");
-                if (reduce == 2) {
-                    break;
+                List<Map<String, Object>> list = map.get(goods.getId());
+                if (CollUtil.isEmpty(list)) {
+                    list = new ArrayList<>();
                 }
 
-                walletService.add(goodsProfit, member.getId(), "commission");
-                moneyFlowService.addMoneyFlow(member.getId(), goodsProfit, MoneyFlowTypeEnum.STATIC_BONUS.getValue(), goods.getOrderNo(), FlowTypeEnum.COMMISSION.getValue());
-                moneyFlowService.addMoneyFlow(member.getId(), goodsProfit.negate(), MoneyFlowTypeEnum.STATIC_BONUS.getValue(), goods.getOrderNo(), FlowTypeEnum.SCORE.getValue());
+                Map<String, Object> listItem = new HashMap<>();
+                listItem.put("memberId", member.getId());
+                listItem.put("orderNo", goods.getOrderNo());
+                list.add(listItem);
+
+                map.put(goods.getId(), list);
+                goodsProp.put(goods.getId(), goods.getStaticProp());
+            }
+        }
+
+        if (!map.isEmpty()) {
+            for (Map.Entry<Long, List<Map<String, Object>>> entry : map.entrySet()) {
+                List<Map<String, Object>> list = entry.getValue();
+                BigDecimal staticProfit = goodsProp.get(entry.getKey()).divide(new BigDecimal("100"), 2, RoundingMode.HALF_UP).multiply(perProfit);
+                BigDecimal preStaticProfit = staticProfit.divide(new BigDecimal(list.size()), 2, RoundingMode.HALF_UP);
+
+                for (Map<String, Object> item : list) {
+                    Long memberId = (Long) item.get("memberId");
+                    String orderNo = (String) item.get("orderNo");
+
+                    int reduce = walletService.reduce(preStaticProfit, memberId, "score");
+                    if (reduce == 2) {
+                        break;
+                    }
+
+                    walletService.add(preStaticProfit, memberId, "commission");
+                    moneyFlowService.addMoneyFlow(memberId, preStaticProfit, MoneyFlowTypeEnum.STATIC_BONUS.getValue(), orderNo, FlowTypeEnum.COMMISSION.getValue());
+                    moneyFlowService.addMoneyFlow(memberId, preStaticProfit.negate(), MoneyFlowTypeEnum.STATIC_BONUS.getValue(), orderNo, FlowTypeEnum.SCORE.getValue());
+                }
             }
         }
     }
@@ -291,7 +315,7 @@
         DataDictionaryCustom dic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(DataDictionaryEnum.RANK_BONUS.getType(), DataDictionaryEnum.RANK_BONUS.getCode());
 
 
-        BigDecimal rankBonusTotal = new BigDecimal(dic.getValue()).divide(totalIncome, 2, RoundingMode.HALF_UP);
+        BigDecimal rankBonusTotal = totalIncome.multiply(new BigDecimal(dic.getValue()).divide(new BigDecimal("100"), 2, RoundingMode.HALF_UP));
         BigDecimal preBonus = rankBonusTotal.divide(BigDecimal.valueOf(100),2 , RoundingMode.HALF_UP);
 
         int i = 0;
diff --git a/src/main/java/cc/mrbird/febs/mall/vo/MoneyFlowVo.java b/src/main/java/cc/mrbird/febs/mall/vo/MoneyFlowVo.java
index 079aa36..178599f 100644
--- a/src/main/java/cc/mrbird/febs/mall/vo/MoneyFlowVo.java
+++ b/src/main/java/cc/mrbird/febs/mall/vo/MoneyFlowVo.java
@@ -22,7 +22,7 @@
     @ApiModelProperty(value = "金额,有正负")
     private BigDecimal amount;
 
-    @ApiModelProperty(value = "类型 1-静态收益 2-直推奖 3-代理收益 4-排名收益 5-董事收益 6-社区点补 7-一代收益 8-提现 9-转增 10-支付 11-退款")
+    @ApiModelProperty(value = "类型 1-静态收益 2-直推奖 3-代理收益 4-排名收益 5-总监收益 6-社区点补 7-一代收益 8-提现 9-转增 10-支付 11-退款")
     private Integer type;
 
     @ApiModelProperty(value = "对方手机号")
diff --git a/src/main/java/cc/mrbird/febs/pay/service/impl/PayServiceImpl.java b/src/main/java/cc/mrbird/febs/pay/service/impl/PayServiceImpl.java
index b0e57e9..5742511 100644
--- a/src/main/java/cc/mrbird/febs/pay/service/impl/PayServiceImpl.java
+++ b/src/main/java/cc/mrbird/febs/pay/service/impl/PayServiceImpl.java
@@ -54,7 +54,7 @@
     @Override
     public String aliPay(MallOrderInfo orderInfo) {
         AlipayTradeAppPayModel model = new AlipayTradeAppPayModel();
-        model.setSubject("全民商城商品支付");
+        model.setSubject("中基商城商品支付");
         model.setBody(orderInfo.getName());
         model.setOutTradeNo(orderInfo.getOrderNo());
         model.setTimeoutExpress("15m");
diff --git a/src/main/resources/mapper/modules/MallGoodsMapper.xml b/src/main/resources/mapper/modules/MallGoodsMapper.xml
index be202c1..4ea59ab 100644
--- a/src/main/resources/mapper/modules/MallGoodsMapper.xml
+++ b/src/main/resources/mapper/modules/MallGoodsMapper.xml
@@ -205,12 +205,12 @@
         select a.*,c.order_no from mall_goods a
             inner join mall_order_item b on a.id=b.goods_id
             inner join mall_order_info c on b.order_id=c.ID
-        where c.status=4
+        where c.status in (2, 3, 4) and b.is_normal=2
         <if test="memberId != null">
             and c.member_id=#{memberId}
         </if>
         <if test="date != null">
-            and date_format(c.receving_time, '%Y-%m-%d') = date_format(#{date}, '%Y-%m-%d')
+            and date_format(c.pay_time, '%Y-%m-%d') = date_format(#{date}, '%Y-%m-%d')
         </if>
     </select>
 </mapper>
\ No newline at end of file
diff --git a/src/main/resources/mapper/modules/MallMemberMapper.xml b/src/main/resources/mapper/modules/MallMemberMapper.xml
index 5ce313a..973bf34 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
@@ -28,6 +28,9 @@
                 <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>
         order by m.CREATED_TIME desc
diff --git a/src/main/resources/templates/error/403.html b/src/main/resources/templates/error/403.html
index 522e78c..b3f1bf2 100644
--- a/src/main/resources/templates/error/403.html
+++ b/src/main/resources/templates/error/403.html
@@ -2,7 +2,7 @@
 <html xmlns:th="http://www.thymeleaf.org">
 <head>
     <meta charset="utf-8">
-    <title>全民商城 权限系统</title>
+    <title>中基商城 权限系统</title>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
     <meta name="renderer" content="webkit">
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
diff --git a/src/main/resources/templates/error/404.html b/src/main/resources/templates/error/404.html
index 8bc24e5..7533203 100644
--- a/src/main/resources/templates/error/404.html
+++ b/src/main/resources/templates/error/404.html
@@ -2,7 +2,7 @@
 <html xmlns:th="http://www.thymeleaf.org">
 <head>
     <meta charset="utf-8">
-    <title>全民商城 权限系统</title>
+    <title>中基商城 权限系统</title>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
     <meta name="renderer" content="webkit">
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
diff --git a/src/main/resources/templates/error/500.html b/src/main/resources/templates/error/500.html
index 690ae41..e002926 100644
--- a/src/main/resources/templates/error/500.html
+++ b/src/main/resources/templates/error/500.html
@@ -2,7 +2,7 @@
 <html xmlns:th="http://www.thymeleaf.org">
 <head>
     <meta charset="utf-8">
-    <title>全民商城 权限系统</title>
+    <title>中基商城 权限系统</title>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
     <meta name="renderer" content="webkit">
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
diff --git a/src/main/resources/templates/febs/views/layout.html b/src/main/resources/templates/febs/views/layout.html
index d2e3373..c468a65 100644
--- a/src/main/resources/templates/febs/views/layout.html
+++ b/src/main/resources/templates/febs/views/layout.html
@@ -64,7 +64,7 @@
         <div class="layui-side-scroll">
             <div class="layui-logo" style="cursor: pointer">
                 <img data-th-src="@{febs/images/logo.png}">
-                <span>全民商城 权限系统</span>
+                <span>中基商城 权限系统</span>
             </div>
             <script
                     type="text/html"
diff --git a/src/main/resources/templates/febs/views/login.html b/src/main/resources/templates/febs/views/login.html
index eaa11ef..1dab9b3 100644
--- a/src/main/resources/templates/febs/views/login.html
+++ b/src/main/resources/templates/febs/views/login.html
@@ -2,7 +2,7 @@
 <html xmlns:th="http://www.thymeleaf.org">
 <head>
     <meta charset="utf-8">
-    <title>全民商城 权限系统</title>
+    <title>中基商城 权限系统</title>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
     <meta name="renderer" content="webkit">
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
@@ -19,7 +19,7 @@
         <div class="layui-container">
             <div class="layui-row">
                 <div class="layui-col-xs12 layui-col-lg4 layui-col-lg-offset4 febs-tc">
-                    <div class="layui-logo"><span><b>全民商城</b> 权限系统</span></div>
+                    <div class="layui-logo"><span><b>中基商城</b> 权限系统</span></div>
                 </div>
                 <div class="layui-col-xs12 layui-col-lg4 layui-col-lg-offset4" id="login-div">
                     <div class="layui-form" lay-filter="login-form">
@@ -62,47 +62,6 @@
                                     </button>
                                 </div>
                             </div>
-                            <div class="layui-form-item febs-tr">
-                                <a id="regist-href">注册账号</a>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-
-                <div class="layui-col-xs12 layui-col-lg4 layui-col-lg-offset4 febs-hide" id="regist-div">
-                    <div class="layui-form" lay-filter="regist-form">
-                        <div class="layui-anim layui-anim-upbit">
-                            <ul class="login-type-tab">
-                                <li class="active">账号注册</li>
-                            </ul>
-                            <div class="normal-login-form">
-                                <div class="layui-form-item">
-                                    <label class="layui-icon label-icon layui-icon-username"></label>
-                                    <input type="text" name="username" minlength="2" maxlength="10" lay-verify="range"
-                                           placeholder="用户名" autocomplete="off" class="layui-input">
-                                </div>
-                                <div class="layui-form-item password-block">
-                                    <label class="layui-icon label-icon layui-icon-password"></label>
-                                    <input type="password" name="password" minlength="6" lay-verify="range"
-                                           placeholder="密码" autocomplete="off" class="layui-input">
-                                </div>
-                                <div class="layui-form-item password-block">
-                                    <label class="layui-icon label-icon layui-icon-password"></label>
-                                    <input type="password" name="passwordB" lay-verify="required"
-                                           placeholder="密码确认" autocomplete="off" class="layui-input">
-                                </div>
-                                <div class="layui-form-item">
-                                    <button class="layui-btn layui-btn-normal layui-btn-fluid" lay-submit
-                                            lay-filter="regist-submit" id="regist">
-                                        <i style="display: none"
-                                           class="layui-icon layui-icon-loading layui-icon layui-anim layui-anim-rotate layui-anim-loop"></i>
-                                        立即注册
-                                    </button>
-                                </div>
-                            </div>
-                        </div>
-                        <div class="layui-form-item febs-tr">
-                            <a id="login-href">已有账号?马上登录</a>
                         </div>
                     </div>
                 </div>
@@ -140,28 +99,6 @@
                     layer.msg(r.message);
                     loading.hide();
                     initCode();
-                }
-            });
-            return false;
-        });
-
-        //提交注册表单
-        form.on('submit(regist-submit)', function (data) {
-            if (data.field.password !== data.field.passwordB) {
-                layer.msg('两次密码输入不一致!');
-                return;
-            }
-            var loading = $(this).find('.layui-icon');
-            if (loading.is(":visible")) return;
-            loading.show();
-            $.post(ctx + 'regist', data.field, function (r) {
-                if (r.code === 200) {
-                    layer.msg('注册成功,请登录');
-                    loading.hide();
-                    $view.find('#login-href').trigger('click');
-                } else {
-                    layer.msg(r.message);
-                    loading.hide();
                 }
             });
             return false;
diff --git a/src/main/resources/templates/febs/views/modules/mallMember/agentList.html b/src/main/resources/templates/febs/views/modules/mallMember/agentList.html
index 65b8799..d91fb68 100644
--- a/src/main/resources/templates/febs/views/modules/mallMember/agentList.html
+++ b/src/main/resources/templates/febs/views/modules/mallMember/agentList.html
@@ -23,10 +23,10 @@
                                             <select name="level">
                                                 <option value="">请选择</option>
                                                 <option value="FIRST_LEVEL">普通会员</option>
-                                                <option value="SECOND_LEVEL">区级代理</option>
-                                                <option value="THIRD_LEVEL">市级代理</option>
-                                                <option value="FOUR_LEVEL">省级代理</option>
-                                                <option value="FIFTH_LEVEL">全国总代</option>
+                                                <option value="SECOND_LEVEL">一星</option>
+                                                <option value="THIRD_LEVEL">二星</option>
+                                                <option value="FOUR_LEVEL">三星</option>
+                                                <option value="FIFTH_LEVEL">四星</option>
                                             </select>
                                         </div>
                                     </div>
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 b4e86de..50e976b 100644
--- a/src/main/resources/templates/febs/views/modules/mallMember/mallMemberList.html
+++ b/src/main/resources/templates/febs/views/modules/mallMember/mallMemberList.html
@@ -27,6 +27,19 @@
                                             </select>
                                         </div>
                                     </div>
+                                    <div class="layui-inline">
+                                        <label class="layui-form-label layui-form-label-sm">会员类型</label>
+                                        <div class="layui-input-inline">
+                                            <select name="level">
+                                                <option value="">请选择</option>
+                                                <option value="FIRST_LEVEL">普通会员</option>
+                                                <option value="SECOND_LEVEL">一星</option>
+                                                <option value="THIRD_LEVEL">二星</option>
+                                                <option value="FOUR_LEVEL">三星</option>
+                                                <option value="FIFTH_LEVEL">四星</option>
+                                            </select>
+                                        </div>
+                                    </div>
                                 </div>
                             </div>
                             <div class="layui-col-md2 layui-col-sm12 layui-col-xs12 table-action-area">
@@ -213,16 +226,16 @@
                 cols: [[
                     {type: 'checkbox'},
                     {field: 'phone', title: '账号', minWidth: 150,align:'left'},
-                    {field: 'bindPhone', title: '手机号', minWidth: 150,align:'left'},
                     {field: 'name', title: '名称', minWidth: 100,align:'left'},
                     {field: 'balance', title: '余额', minWidth: 100,align:'left'},
                     {field: 'score', title: '赠送积分', minWidth: 100,align:'left'},
                     {field: 'prizeScore', title: '竞猜积分', minWidth: 100,align:'left'},
+                    {field: 'commission', title: '佣金', minWidth: 100,align:'left'},
                     {field: 'inviteId', title: '邀请码', minWidth: 100,align:'left'},
                     {field: 'referrerName', title: '推荐人', minWidth: 100,align:'left'},
                     {field: 'levelName', title: '会员类型', minWidth: 100,align:'left'},
                     {field: 'storeMaster', title: '店长', templet:'#switchStoreMaster', minWidth: 100},
-                    {field: 'director', title: '董事', templet:'#switchDirector', minWidth: 100},
+                    {field: 'director', title: '总监', templet:'#switchDirector', minWidth: 100},
                     {field: 'accountType', title: '账号类型',
                         templet: function (d) {
                             if (d.accountType === 2) {
@@ -342,6 +355,7 @@
                 name: $searchForm.find('input[name="name"]').val().trim(),
                 account: $searchForm.find('input[name="account"]').val().trim(),
                 accountStatus: $searchForm.find("select[name='accountStatus']").val(),
+                level: $searchForm.find("select[name='level']").val(),
             };
         }
 
diff --git a/src/main/resources/templates/febs/views/modules/mallMember/moneyFlow.html b/src/main/resources/templates/febs/views/modules/mallMember/moneyFlow.html
index 2250265..e3be378 100644
--- a/src/main/resources/templates/febs/views/modules/mallMember/moneyFlow.html
+++ b/src/main/resources/templates/febs/views/modules/mallMember/moneyFlow.html
@@ -55,7 +55,7 @@
                             } else if (d.type === 4) {
                                 return '<span>排名收益</span>'
                             }else if (d.type === 5) {
-                                return '<span>董事收益</span>'
+                                return '<span>总监收益</span>'
                             }else if (d.type === 6) {
                                 return '<span>社区店补</span>'
                             }else if (d.type === 7) {
diff --git a/src/main/resources/templates/febs/views/modules/mallMember/moneyFlowList.html b/src/main/resources/templates/febs/views/modules/mallMember/moneyFlowList.html
index c812f68..736ba65 100644
--- a/src/main/resources/templates/febs/views/modules/mallMember/moneyFlowList.html
+++ b/src/main/resources/templates/febs/views/modules/mallMember/moneyFlowList.html
@@ -26,7 +26,7 @@
                                                 <option value="2">直推奖</option>
                                                 <option value="3">代理收益</option>
                                                 <option value="4">排名收益</option>
-                                                <option value="5">董事收益</option>
+                                                <option value="5">总监收益</option>
                                                 <option value="6">社区店补</option>
                                                 <option value="7">一代收益</option>
                                                 <option value="8">提现</option>
@@ -131,7 +131,7 @@
                             } else if (d.type === 4) {
                                 return '<span>排名收益</span>'
                             }else if (d.type === 5) {
-                                return '<span>董事收益</span>'
+                                return '<span>总监收益</span>'
                             }else if (d.type === 6) {
                                 return '<span>社区店补</span>'
                             }else if (d.type === 7) {
diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html
index a55caa1..3e1f40f 100644
--- a/src/main/resources/templates/index.html
+++ b/src/main/resources/templates/index.html
@@ -3,7 +3,7 @@
       xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
 <head>
     <meta charset="utf-8">
-    <title>全民商城 权限系统</title>
+    <title>中基商城 权限系统</title>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
     <meta name="renderer" content="webkit">
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
diff --git a/src/test/java/cc/mrbird/febs/AgentTest.java b/src/test/java/cc/mrbird/febs/AgentTest.java
index 12b948b..853c2c3 100644
--- a/src/test/java/cc/mrbird/febs/AgentTest.java
+++ b/src/test/java/cc/mrbird/febs/AgentTest.java
@@ -530,19 +530,19 @@
 
     @Test
     public void insertAgentTest() {
-        AgentInfo agentInfo = new AgentInfo();
-        agentInfo.setOrderType(2);
-        agentInfo.setOrderCnt(2000);
-        agentInfo.setLastCnt(3);
-        agentInfo.setDirectIncome(BigDecimal.valueOf(50));
-        agentInfo.setTeamIncome(BigDecimal.valueOf(15));
-        agentInfo.setTeamIncomeType(2);
-
-        DataDictionaryCustom data = new DataDictionaryCustom();
-        data.setType("AGENT_LEVEL_REQUIRE");
-        data.setCode(AgentLevelEnum.FOUR_LEVEL.name());
-        data.setValue(JSONObject.toJSONString(agentInfo));
-        dataDictionaryCustomMapper.insert(data);
+//        AgentInfo agentInfo = new AgentInfo();
+//        agentInfo.setOrderType(2);
+//        agentInfo.setOrderCnt(2000);
+//        agentInfo.setLastCnt(3);
+//        agentInfo.setDirectIncome(BigDecimal.valueOf(50));
+//        agentInfo.setTeamIncome(BigDecimal.valueOf(15));
+//        agentInfo.setTeamIncomeType(2);
+//
+//        DataDictionaryCustom data = new DataDictionaryCustom();
+//        data.setType("AGENT_LEVEL_REQUIRE");
+//        data.setCode(AgentLevelEnum.FOUR_LEVEL.name());
+//        data.setValue(JSONObject.toJSONString(agentInfo));
+//        dataDictionaryCustomMapper.insert(data);
     }
 
     @Test
diff --git a/src/test/java/cc/mrbird/febs/ProfitTest.java b/src/test/java/cc/mrbird/febs/ProfitTest.java
index 3fa77eb..b279e38 100644
--- a/src/test/java/cc/mrbird/febs/ProfitTest.java
+++ b/src/test/java/cc/mrbird/febs/ProfitTest.java
@@ -36,11 +36,22 @@
         memberProfitService.dynamicProfit(59L);
     }
 
+
+    @Test
+    public void staticProfit() {
+        memberProfitService.staticProfit();
+    }
+
     @Test
     public void thankfulProfit() {
         memberProfitService.thankfulProfit();
     }
 
+    @Test
+    public void rankProfit() {
+        memberProfitService.rankProfit();
+    }
+
     @Autowired
     private MallOrderInfoMapper mallOrderInfoMapper;
 

--
Gitblit v1.9.1