From 8948d3e30d31fe7645c66e50d280c256dd3c4b5c Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Mon, 20 Mar 2023 12:44:02 +0800
Subject: [PATCH] 后台修改

---
 src/main/java/cc/mrbird/febs/mall/vo/MallGoodsListVo.java                       |    8 +
 src/main/java/cc/mrbird/febs/mall/entity/MallGoods.java                         |    8 +
 src/main/resources/templates/febs/views/modules/system/hlmScoreSet.html         |   14 +-
 src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallOrderInfoServiceImpl.java |   68 ++++++-------
 src/main/resources/templates/febs/views/modules/mallMember/moneyFlow.html       |   38 ++++++-
 src/main/java/cc/mrbird/febs/mall/dto/AddMallGoodsDto.java                      |    8 +
 src/main/java/cc/mrbird/febs/mall/vo/MallGoodsDetailsVo.java                    |    8 +
 src/main/resources/mapper/modules/MallGoodsMapper.xml                           |   11 +
 src/main/java/cc/mrbird/febs/mall/vo/AdminMallGoodsVo.java                      |    8 +
 src/main/resources/templates/febs/views/modules/mallMember/moneyFlowList.html   |    2 
 src/main/resources/templates/febs/views/modules/goods/goodsAddNew.html          |   16 +++
 src/main/java/cc/mrbird/febs/mall/service/impl/AgentServiceImpl.java            |    9 +
 src/main/java/cc/mrbird/febs/mall/service/impl/MemberProfitServiceImpl.java     |   14 ++
 src/main/java/cc/mrbird/febs/mall/vo/AdminMallMoneyFlowVo.java                  |    5 +
 src/main/resources/mapper/modules/MallMoneyFlowMapper.xml                       |   15 ++
 src/main/resources/templates/febs/views/modules/goods/goodsUpdateNew.html       |   21 ++++
 src/main/java/cc/mrbird/febs/mall/dto/MallGoodsUpdateDto.java                   |    8 +
 src/main/resources/templates/febs/views/modules/goods/goodsList.html            |   14 +-
 src/main/java/cc/mrbird/febs/mall/vo/AdminMoneyFlowListVo.java                  |    4 
 19 files changed, 212 insertions(+), 67 deletions(-)

diff --git a/src/main/java/cc/mrbird/febs/mall/dto/AddMallGoodsDto.java b/src/main/java/cc/mrbird/febs/mall/dto/AddMallGoodsDto.java
index ad139d9..99ebfc9 100644
--- a/src/main/java/cc/mrbird/febs/mall/dto/AddMallGoodsDto.java
+++ b/src/main/java/cc/mrbird/febs/mall/dto/AddMallGoodsDto.java
@@ -83,5 +83,13 @@
     private BigDecimal carriage;
 
     private BigDecimal star;
+    /**
+     * 排序位置
+     */
+    private Integer sortCnt;
+    /**
+     * 积分兑换比例
+     */
+    private Integer scorePercent;
 
 }
diff --git a/src/main/java/cc/mrbird/febs/mall/dto/MallGoodsUpdateDto.java b/src/main/java/cc/mrbird/febs/mall/dto/MallGoodsUpdateDto.java
index 2304173..2033730 100644
--- a/src/main/java/cc/mrbird/febs/mall/dto/MallGoodsUpdateDto.java
+++ b/src/main/java/cc/mrbird/febs/mall/dto/MallGoodsUpdateDto.java
@@ -87,4 +87,12 @@
 
     private BigDecimal carriage;
     private BigDecimal star;
+    /**
+     * 排序位置
+     */
+    private Integer sortCnt;
+    /**
+     * 积分兑换比例
+     */
+    private Integer scorePercent;
 }
diff --git a/src/main/java/cc/mrbird/febs/mall/entity/MallGoods.java b/src/main/java/cc/mrbird/febs/mall/entity/MallGoods.java
index 056d026..2f6a93d 100644
--- a/src/main/java/cc/mrbird/febs/mall/entity/MallGoods.java
+++ b/src/main/java/cc/mrbird/febs/mall/entity/MallGoods.java
@@ -118,5 +118,13 @@
      * 贡献值
      */
     private BigDecimal star;
+    /**
+     * 排序位置
+     */
+    private Integer sortCnt;
+    /**
+     * 积分兑换比例
+     */
+    private Integer scorePercent;
 
 }
diff --git a/src/main/java/cc/mrbird/febs/mall/service/impl/AgentServiceImpl.java b/src/main/java/cc/mrbird/febs/mall/service/impl/AgentServiceImpl.java
index 45659b6..7659087 100644
--- a/src/main/java/cc/mrbird/febs/mall/service/impl/AgentServiceImpl.java
+++ b/src/main/java/cc/mrbird/febs/mall/service/impl/AgentServiceImpl.java
@@ -222,7 +222,12 @@
                         sharePerkAmount,
                         MoneyFlowTypeEnum.DYNAMIC_ACHIEVE.getValue(),
                         mallOrderInfo.getOrderNo(),
-                        FlowTypeEnum.BALANCE.getValue());
+                        "直推奖",
+                        "补贴额度:"+totalScore,
+                        memberId,
+                        2,
+                        FlowTypeEnum.BALANCE.getValue(),
+                        1);
             }
         }
         /**
@@ -387,6 +392,7 @@
                         mallMoneyFlow.setOrderNo(orderNo);
                         mallMoneyFlow.setRtMemberId(memberId);
                         mallMoneyFlow.setStatus(2);
+                        mallMoneyFlow.setRemark("补贴额度:"+mallMemberWallet.getTotalScore());
                         mallMoneyFlow.setFlowType(FlowTypeEnum.BALANCE.getValue());
                         mallMoneyFlows.add(mallMoneyFlow);
                     }
@@ -463,6 +469,7 @@
                 mallMoneyFlow.setOrderNo(orderNo);
                 mallMoneyFlow.setRtMemberId(memberId);
                 mallMoneyFlow.setStatus(2);
+                mallMoneyFlow.setRemark("补贴额度:"+mallMemberWallet.getTotalScore());
                 mallMoneyFlow.setFlowType(FlowTypeEnum.BALANCE.getValue());
                 mallMoneyFlows.add(mallMoneyFlow);
             }
diff --git a/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallOrderInfoServiceImpl.java b/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallOrderInfoServiceImpl.java
index 593621c..8b8639b 100644
--- a/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallOrderInfoServiceImpl.java
+++ b/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallOrderInfoServiceImpl.java
@@ -206,25 +206,19 @@
         /**
          * 使用积分折扣现金
          */
-        DataDictionaryCustom scorePercentDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(
-                DataDictionaryEnum.SCORE_PERCENT.getType(),
-                DataDictionaryEnum.SCORE_PERCENT.getCode()
-        );
         DataDictionaryCustom scoreChangeDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(
                 DataDictionaryEnum.SCORE_CHANGE.getType(),
                 DataDictionaryEnum.SCORE_CHANGE.getCode()
         );
         BigDecimal score = ObjectUtil.isEmpty(addOrderDto.getScore()) ? BigDecimal.ZERO : addOrderDto.getScore();
         orderInfo.setScoreCnt(score);
-        if(ObjectUtil.isNotEmpty(scorePercentDic)){
-            BigDecimal scoreChange = BigDecimal.ONE;
-            if(ObjectUtil.isNotEmpty(scoreChangeDic)){
-                scoreChange = new BigDecimal(scoreChangeDic.getValue()).abs().setScale(2,BigDecimal.ROUND_DOWN);
-            }
-            //折扣现金
-            BigDecimal scorePercentAmount = score.divide(scoreChange,BigDecimal.ROUND_DOWN).setScale(2,BigDecimal.ROUND_DOWN);
-            orderInfo.setScoreAmount(scorePercentAmount);
+        BigDecimal scoreChange = BigDecimal.ONE;
+        if(ObjectUtil.isNotEmpty(scoreChangeDic)){
+            scoreChange = new BigDecimal(scoreChangeDic.getValue()).abs().setScale(2,BigDecimal.ROUND_DOWN);
         }
+        //折扣现金
+        BigDecimal scorePercentAmount = score.divide(scoreChange,BigDecimal.ROUND_DOWN).setScale(2,BigDecimal.ROUND_DOWN);
+        orderInfo.setScoreAmount(scorePercentAmount);
         orderInfo.setAmount(total);
         if(2 == deliverType){
             orderInfo.setDeliverType(2);
@@ -851,18 +845,24 @@
         }
 
         boolean hasTc = false;
+        //总的折扣积分数量
         BigDecimal total = BigDecimal.ZERO;
         for (AddOrderItemDto item : addOrderDto.getItems()) {
-                MallGoodsSku sku = mallGoodsSkuMapper.selectSkuInfoById(item.getSkuId());
-                MallGoods mallGoods = mallGoodsMapper.selectById(sku.getGoodsId());
-                /**
-                 * 贡献点判断
+            MallGoodsSku sku = mallGoodsSkuMapper.selectSkuInfoById(item.getSkuId());
+            MallGoods mallGoods = mallGoodsMapper.selectById(sku.getGoodsId());
+            /**
+             * 贡献点判断
+             */
+            if (mallGoods.getIsNormal() == 2) {
+                hasTc = true;
+            }
+                /*
+                获取单个商品的折扣积分数量
+                    = 现价 * 数量 * 折扣现金比例
                  */
-                if (mallGoods.getIsNormal() == 2) {
-                    hasTc = true;
-                }
-                BigDecimal amount = sku.getPresentPrice().multiply(BigDecimal.valueOf(item.getCnt()));
-                total = total.add(amount);
+            BigDecimal scorePercent = new BigDecimal(mallGoods.getScorePercent()).multiply(new BigDecimal(0.01));
+            BigDecimal amount = sku.getPresentPrice().multiply(BigDecimal.valueOf(item.getCnt())).multiply(scorePercent);
+            total = total.add(amount);
         }
 
         BigDecimal score = ObjectUtil.isEmpty(addOrderDto.getScore()) ? BigDecimal.ZERO : addOrderDto.getScore();
@@ -889,28 +889,20 @@
         /**
          * 使用积分折扣现金
          */
-        DataDictionaryCustom scorePercentDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(
-                DataDictionaryEnum.SCORE_PERCENT.getType(),
-                DataDictionaryEnum.SCORE_PERCENT.getCode()
-        );
         DataDictionaryCustom scoreChangeDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(
                 DataDictionaryEnum.SCORE_CHANGE.getType(),
                 DataDictionaryEnum.SCORE_CHANGE.getCode()
         );
 
-        if(ObjectUtil.isNotEmpty(scorePercentDic)){
-            //商品的现金折扣比例
-            BigDecimal scorePercent = new BigDecimal(scorePercentDic.getValue()).multiply(BigDecimal.valueOf(0.01));
-            //最大折扣金额对应需要的总积分数目
-            BigDecimal scorePercentMaxAmount = total.multiply(scorePercent);
-            BigDecimal scoreChange = BigDecimal.ONE;
-            if(ObjectUtil.isNotEmpty(scoreChangeDic)){
-                scoreChange = new BigDecimal(scoreChangeDic.getValue()).abs().setScale(2,BigDecimal.ROUND_DOWN);
-            }
-            scorePercentMaxAmount = scorePercentMaxAmount.multiply(scoreChange).setScale(2,BigDecimal.ROUND_DOWN);
-            if(scorePercentMaxAmount.compareTo(score) < 0){
-                throw new FebsException("最多可使用"+scorePercentMaxAmount+"积分");
-            }
+        //最大折扣金额对应需要的总积分数目
+        BigDecimal scorePercentMaxAmount = total;
+        BigDecimal scoreChange = BigDecimal.ONE;
+        if(ObjectUtil.isNotEmpty(scoreChangeDic)){
+            scoreChange = new BigDecimal(scoreChangeDic.getValue()).abs().setScale(2,BigDecimal.ROUND_DOWN);
+        }
+        scorePercentMaxAmount = scorePercentMaxAmount.multiply(scoreChange).setScale(2,BigDecimal.ROUND_DOWN);
+        if(scorePercentMaxAmount.compareTo(score) < 0){
+            throw new FebsException("最多可使用"+scorePercentMaxAmount+"积分");
         }
         return new FebsResponse().success();
     }
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 7411b14..d032da7 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
@@ -733,13 +733,25 @@
                     mallMemberWalletMapper.reduceTotalScoreById(teamEqualsPerkAmount, mallMemberWallet.getId());
 
                     mallMemberWalletMapper.addBalanceById(teamEqualsPerkAmount, mallMemberWallet.getId());
+//
+//                    mallMoneyFlowService.addMoneyFlow(
+//                            adminTeamEqualsPerkVo.getRtMemberId(),
+//                            teamEqualsPerkAmount,
+//                            MoneyFlowTypeEnum.TEAM_EQUALS_PERK.getValue(),
+//                            MallUtils.getOrderNum("TEP"),
+//                            FlowTypeEnum.BALANCE.getValue());
 
                     mallMoneyFlowService.addMoneyFlow(
                             adminTeamEqualsPerkVo.getRtMemberId(),
                             teamEqualsPerkAmount,
                             MoneyFlowTypeEnum.TEAM_EQUALS_PERK.getValue(),
                             MallUtils.getOrderNum("TEP"),
-                            FlowTypeEnum.BALANCE.getValue());
+                            "平级奖励补贴",
+                            "补贴额度:"+mallMemberWallet.getTotalScore(),
+                            adminTeamEqualsPerkVo.getMemberId(),
+                            2,
+                            FlowTypeEnum.BALANCE.getValue(),
+                            1);
                 }
             }
         }
diff --git a/src/main/java/cc/mrbird/febs/mall/vo/AdminMallGoodsVo.java b/src/main/java/cc/mrbird/febs/mall/vo/AdminMallGoodsVo.java
index 3f7e649..7170d64 100644
--- a/src/main/java/cc/mrbird/febs/mall/vo/AdminMallGoodsVo.java
+++ b/src/main/java/cc/mrbird/febs/mall/vo/AdminMallGoodsVo.java
@@ -44,4 +44,12 @@
     private BigDecimal score;
 
     private int isNormal;
+    /**
+     * 排序位置
+     */
+    private Integer sortCnt;
+    /**
+     * 积分兑换比例
+     */
+    private Integer scorePercent;
 }
diff --git a/src/main/java/cc/mrbird/febs/mall/vo/AdminMallMoneyFlowVo.java b/src/main/java/cc/mrbird/febs/mall/vo/AdminMallMoneyFlowVo.java
index 6b8270b..cac24eb 100644
--- a/src/main/java/cc/mrbird/febs/mall/vo/AdminMallMoneyFlowVo.java
+++ b/src/main/java/cc/mrbird/febs/mall/vo/AdminMallMoneyFlowVo.java
@@ -17,6 +17,7 @@
     private BigDecimal amount;
 
     private Integer type;
+
     private Integer flowType;
 
     private String orderNo;
@@ -24,5 +25,9 @@
     private String description;
 
     private String remark;
+    /**
+     * 来源
+     */
+    private String fromMemberName;
 
 }
diff --git a/src/main/java/cc/mrbird/febs/mall/vo/AdminMoneyFlowListVo.java b/src/main/java/cc/mrbird/febs/mall/vo/AdminMoneyFlowListVo.java
index 8d055bd..1f931a5 100644
--- a/src/main/java/cc/mrbird/febs/mall/vo/AdminMoneyFlowListVo.java
+++ b/src/main/java/cc/mrbird/febs/mall/vo/AdminMoneyFlowListVo.java
@@ -37,5 +37,9 @@
     private String bindPhone;
 
     private Integer flowType;
+    /**
+     * 来源
+     */
+    private String fromMemberName;
 
 }
diff --git a/src/main/java/cc/mrbird/febs/mall/vo/MallGoodsDetailsVo.java b/src/main/java/cc/mrbird/febs/mall/vo/MallGoodsDetailsVo.java
index 25eebaa..7d7769c 100644
--- a/src/main/java/cc/mrbird/febs/mall/vo/MallGoodsDetailsVo.java
+++ b/src/main/java/cc/mrbird/febs/mall/vo/MallGoodsDetailsVo.java
@@ -71,4 +71,12 @@
 
     @ApiModelProperty(value = "评论数量")
     private Integer commentCount;
+    /**
+     * 排序位置
+     */
+    private Integer sortCnt;
+    /**
+     * 积分兑换比例
+     */
+    private Integer scorePercent;
 }
diff --git a/src/main/java/cc/mrbird/febs/mall/vo/MallGoodsListVo.java b/src/main/java/cc/mrbird/febs/mall/vo/MallGoodsListVo.java
index bc3d4d4..24215b8 100644
--- a/src/main/java/cc/mrbird/febs/mall/vo/MallGoodsListVo.java
+++ b/src/main/java/cc/mrbird/febs/mall/vo/MallGoodsListVo.java
@@ -40,4 +40,12 @@
 
     @ApiModelProperty(value = "是否有运费 1-是 2-包邮")
     private Integer hasCarriage;
+    /**
+     * 排序位置
+     */
+    private Integer sortCnt;
+    /**
+     * 积分兑换比例
+     */
+    private Integer scorePercent;
 }
diff --git a/src/main/resources/mapper/modules/MallGoodsMapper.xml b/src/main/resources/mapper/modules/MallGoodsMapper.xml
index 982862d..56457f4 100644
--- a/src/main/resources/mapper/modules/MallGoodsMapper.xml
+++ b/src/main/resources/mapper/modules/MallGoodsMapper.xml
@@ -72,6 +72,8 @@
                 a.present_price,
                 a.score,
                 a.is_hot,
+                a.score_percent,
+                a.sort_cnt,
                 min(b.present_price) price,
                 sum(b.sku_volume) saleVolume
             from mall_goods a
@@ -104,8 +106,11 @@
             order by a.id desc
         ) a
         <if test="record.sortType != null">
+<!--            <if test="record.sortType == 1">-->
+<!--                order by a.is_hot, a.saleVolume desc, a.id-->
+<!--            </if>-->
             <if test="record.sortType == 1">
-                order by a.is_hot, a.saleVolume desc, a.id
+                order by a.is_normal, a.sort_cnt asc
             </if>
             <if test="record.sortType == 2">
                 order by a.saleVolume desc
@@ -137,6 +142,8 @@
         a.is_hot,
         a.score,
         a.is_normal,
+        a.sort_cnt,
+        a.score_percent,
         b.name categaryName,
         IFNULL(sum(c.sku_volume), a.volume) skuVolume,
         IFNULL(sum(c.stock), a.stock) stock
@@ -154,7 +161,7 @@
             </if>
         </where>
         group by a.id
-        order by a.created_time desc
+        order by a.is_normal,a.sort_cnt asc
     </select>
 
     <select id="selectMallGoodsCountByGoodsName" resultType="java.lang.Integer">
diff --git a/src/main/resources/mapper/modules/MallMoneyFlowMapper.xml b/src/main/resources/mapper/modules/MallMoneyFlowMapper.xml
index 7179b65..df94c30 100644
--- a/src/main/resources/mapper/modules/MallMoneyFlowMapper.xml
+++ b/src/main/resources/mapper/modules/MallMoneyFlowMapper.xml
@@ -3,7 +3,12 @@
 <mapper namespace="cc.mrbird.febs.mall.mapper.MallMoneyFlowMapper">
 
     <select id="selectMoneyFlowInPage" resultType="cc.mrbird.febs.mall.vo.AdminMallMoneyFlowVo">
-        select * from mall_money_flow a where a.member_id = #{record.id}
+        select
+               a.*,
+               b.name fromMemberName
+        from mall_money_flow a
+        left join mall_member b on a.rt_member_id = b.id
+        where a.member_id = #{record.id}
         order by a.CREATED_TIME desc
     </select>
 
@@ -43,10 +48,12 @@
         b.name,
         b.bind_phone bindPhone,
         c.pay_method payMethod,
-        b.phone
+        b.phone,
+        d.name fromMemberName
         from mall_money_flow a
-        inner join mall_member b on a.member_id=b.id
+        left join mall_member b on a.member_id=b.id
         left join mall_order_info c on a.order_no = c.order_no
+        left join mall_member d on d.id = a.rt_member_id
         <where>
             <if test="record != null" >
                 <if test="record.name!=null and record.name!=''">
@@ -146,6 +153,7 @@
             order_no,
             rt_member_id,
             status,
+            remark,
             flow_type) VALUES
                 (
                     #{revision},
@@ -159,6 +167,7 @@
                     #{orderNo},
                     #{rtMemberId},
                     #{status},
+                    #{remark},
                     #{flowType}
                 )
     </insert>
diff --git a/src/main/resources/templates/febs/views/modules/goods/goodsAddNew.html b/src/main/resources/templates/febs/views/modules/goods/goodsAddNew.html
index e13398f..cce45f6 100644
--- a/src/main/resources/templates/febs/views/modules/goods/goodsAddNew.html
+++ b/src/main/resources/templates/febs/views/modules/goods/goodsAddNew.html
@@ -67,6 +67,22 @@
                                                 </div>
                                             </div>
                                         </div>
+                                        <div class="layui-form-item">
+                                            <div class="layui-col-lg6">
+                                                <label class="layui-form-label febs-form-item-require">排序:</label>
+                                                <div class="layui-input-block">
+                                                    <input type="text" name="sortCnt"  lay-verify="required|integer" placeholder="" autocomplete="off" class="layui-input">
+                                                    <div class="layui-form-mid layui-word-aux">设置商品排序位置,想排列在前,设置的数字越小</div>
+                                                </div>
+                                            </div>
+                                            <div class="layui-col-lg6">
+                                                <label class="layui-form-label febs-form-item-require">抵扣现金(%):</label>
+                                                <div class="layui-input-block">
+                                                    <input type="text" name="scorePercent"  lay-verify="required|integer" placeholder="" autocomplete="off" class="layui-input">
+                                                    <div class="layui-word-aux">设置50,即商品价格1000,积分可抵扣的最大金额为1000*50%=500,填写整数,如【50】</div>
+                                                </div>
+                                            </div>
+                                        </div>
 
                                         <div class="layui-form-item">
                                             <label class="layui-form-label">商品介绍:</label>
diff --git a/src/main/resources/templates/febs/views/modules/goods/goodsList.html b/src/main/resources/templates/febs/views/modules/goods/goodsList.html
index a56a05d..4b7e0ca 100644
--- a/src/main/resources/templates/febs/views/modules/goods/goodsList.html
+++ b/src/main/resources/templates/febs/views/modules/goods/goodsList.html
@@ -226,31 +226,29 @@
                 id: 'userTable',
                 url: ctx + 'admin/goods/goodsList?goodsType=1',
                 cols: [[
+                    {field: 'sortCnt', title: '序号', minWidth: 80,align:'left'},
                     {field: 'goodsNo', title: '商品编号', minWidth: 100,align:'left'},
                     {field: 'goodsName', title: '商品名称', minWidth: 140,align:'left'},
                     {field: 'thumb', title: '缩略图',
                         templet: function (d) {
                             return '<a lay-event="seeImgThumb"><img id="seeImgThumb'+d.id+'" src="'+d.thumb+'" alt=""></a>';
                         }, minWidth: 150,align:'center'},
-                    {field: 'categaryName', title: '分类', minWidth: 140,align:'left'},
+                    {field: 'categaryName', title: '分类', minWidth: 100,align:'left'},
                     {field: 'isSale', title: '是否上架', templet: '#upOrDownSwitch', minWidth: 100,align:'center'},
                     {field: 'isHot', title: '是否主推', templet: '#isHotSwitch', minWidth: 100,align:'center'},
-                    {templet:"#goodsTypeFormat",  title: '商品类型', minWidth: 140,align:'left'},
+                    {templet:"#goodsTypeFormat",  title: '商品类型', minWidth: 100,align:'left'},
                     {templet:"#isSkuFormat", title: '是否多规格', minWidth: 100,align:'left'},
                     {field: 'presentPrice', title: '现价', minWidth: 100,align:'left'},
-                    {field: 'originalPrice', title: '原价', minWidth: 100,align:'left'},
+                    // {field: 'originalPrice', title: '原价', minWidth: 100,align:'left'},
                     {field: 'stock', title: '商品库存', minWidth: 100,align:'left'},
                     {field: 'skuVolume', title: '商品销量', minWidth: 100,align:'left'},
+                    {field: 'scorePercent', title: '兑换比例', minWidth: 100,align:'left'},
                     {title: '操作',
                         templet: function (d) {
                             if (d.isSale === 1) {
                                 return '';
-                                // return '<button class="layui-btn layui-btn-normal layui-btn-xs febs-bg-orange" lay-event="downGoods" shiro:hasPermission="user:update">下架</button>'
-                                // + '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="detailGoods" shiro:hasPermission="user:update">详情</button>'
                             }else{
-                                // '<button class="layui-btn layui-btn-normal layui-btn-xs febs-bg-green" lay-event="upGoods" shiro:hasPermission="user:update">上架</button>'
-                                return ''
-                                + '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="goodsUpdate" shiro:hasPermission="user:update">编辑</button>'
+                                return '<button class="layui-btn layui-btn-normal layui-btn-xs" lay-event="goodsUpdate" shiro:hasPermission="user:update">编辑</button>'
                                     + '<button class="layui-btn layui-btn-normal layui-btn-xs febs-bg-red" lay-event="delGoods" shiro:hasPermission="user:update">删除</button>'
 
                             }
diff --git a/src/main/resources/templates/febs/views/modules/goods/goodsUpdateNew.html b/src/main/resources/templates/febs/views/modules/goods/goodsUpdateNew.html
index 9d3eefd..6d52229 100644
--- a/src/main/resources/templates/febs/views/modules/goods/goodsUpdateNew.html
+++ b/src/main/resources/templates/febs/views/modules/goods/goodsUpdateNew.html
@@ -76,6 +76,23 @@
                                         </div>
 
                                         <div class="layui-form-item">
+                                            <div class="layui-col-lg6">
+                                                <label class="layui-form-label febs-form-item-require">排序:</label>
+                                                <div class="layui-input-block">
+                                                    <input type="text" name="sortCnt"  lay-verify="required|integer" placeholder="" autocomplete="off" class="layui-input">
+                                                    <div class="layui-form-mid layui-word-aux">设置商品排序位置,想排列在前,设置的数字越小</div>
+                                                </div>
+                                            </div>
+                                            <div class="layui-col-lg6">
+                                                <label class="layui-form-label febs-form-item-require">抵扣现金(%):</label>
+                                                <div class="layui-input-block">
+                                                    <input type="text" name="scorePercent"  lay-verify="required|integer" placeholder="" autocomplete="off" class="layui-input">
+                                                    <div class="layui-word-aux">设置50,即商品价格1000,积分可抵扣的最大金额为1000*50%=500,填写整数,如【50】</div>
+                                                </div>
+                                            </div>
+                                        </div>
+
+                                        <div class="layui-form-item">
                                             <label class="layui-form-label">商品介绍:</label>
                                             <div class="layui-input-block">
                                                 <label>
@@ -100,7 +117,7 @@
                                         <div class="layui-form-item febs-hide tc-set">
                                             <label class="layui-form-label">贡献值:</label>
                                             <div class="layui-input-block">
-                                                <input type="text" name="star" lay-verify="required|integer"  placeholder="请输入贡献值" autocomplete="off" class="layui-input">
+                                                <input type="text" name="star" lay-verify="required"  placeholder="请输入贡献值" autocomplete="off" class="layui-input">
                                                 <div class="layui-form-mid layui-word-aux">支付后,用户获取对应的贡献值</div>
                                             </div>
                                         </div>
@@ -667,6 +684,8 @@
                 "isSku": goodsInfo.isSku,
                 "thumb": goodsInfo.thumb,
                 "star": goodsInfo.star,
+                "sortCnt": goodsInfo.sortCnt,
+                "scorePercent": goodsInfo.scorePercent,
                 "thumbs": thumbs
             });
 
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 d720f1d..a7ff01b 100644
--- a/src/main/resources/templates/febs/views/modules/mallMember/moneyFlow.html
+++ b/src/main/resources/templates/febs/views/modules/mallMember/moneyFlow.html
@@ -43,6 +43,7 @@
                 id: 'moneyFlowChild',
                 url: ctx + 'admin/mallMember/moneyFlow?parentId=1',
                 cols: [[
+                    {field: 'fromMemberName', title: '来自', minWidth: 80,align:'center'},
                     {field: 'amount', title: '金额', minWidth: 80,align:'center'},
                     {field: 'type', title: '流水类型',
                         templet: function (d) {
@@ -73,13 +74,39 @@
                             }else if (d.type === 13) {
                                 return '<span>佣金转余额</span>'
                             }else if (d.type === 14) {
-                                return '<span>竞猜积分签到</span>'
+                                return '<span>签到</span>'
                             }else if (d.type === 15) {
                                 return '<span>感恩奖</span>'
                             }else if (d.type === 16) {
                                 return '<span>系统拨付</span>'
                             }else if (d.type === 17) {
                                 return '<span>抽奖</span>'
+                            }else if (d.type === 18) {
+                                return '<span>积分池收益</span>'
+                            }else if (d.type === 19) {
+                                return '<span>1星合伙人补贴</span>'
+                            }else if (d.type === 20) {
+                                return '<span>2星合伙人补贴</span>'
+                            }else if (d.type === 21) {
+                                return '<span>3星合伙人补贴</span>'
+                            }else if (d.type === 22) {
+                                return '<span>4星合伙人补贴</span>'
+                            }else if (d.type === 23) {
+                                return '<span>5星合伙人补贴</span>'
+                            }else if (d.type === 24) {
+                                return '<span>6星合伙人补贴</span>'
+                            }else if (d.type === 25) {
+                                return '<span>贡献点</span>'
+                            }else if (d.type === 26) {
+                                return '<span>补贴额度</span>'
+                            }else if (d.type === 27) {
+                                return '<span>团队补贴</span>'
+                            }else if (d.type === 28) {
+                                return '<span>平级奖励补贴</span>'
+                            }else if (d.type === 29) {
+                                return '<span>线下服务中心补贴</span>'
+                            }else if (d.type === 30) {
+                                return '<span>代理商补贴</span>'
                             }else{
                                 return ''
                             }
@@ -88,17 +115,16 @@
                         templet: function (d) {
                             if (d.flowType === 1) {
                                 return '余额';
-                            } else if(d.flowType === 2) {
-                                return '赠送积分'
                             } else if(d.flowType === 3) {
-                                return '竞猜积分'
-                            } else if(d.flowType === 4) {
-                                return '佣金'
+                                return '现金积分'
+                            } else if(d.flowType === 5) {
+                                return '贡献点'
                             } else {
                                 return '-';
                             }
                         }, minWidth: 80,align:'center'},
                     {field: 'orderNo', title: '订单编号', minWidth: 150,align:'center'},
+                    {field: 'remark', title: '备注', minWidth: 150,align:'left'},
                     {field: 'createdTime', title: '时间', minWidth: 150,align:'left'}
                 ]]
             });
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 8aed294..0c3902e 100644
--- a/src/main/resources/templates/febs/views/modules/mallMember/moneyFlowList.html
+++ b/src/main/resources/templates/febs/views/modules/mallMember/moneyFlowList.html
@@ -125,6 +125,7 @@
                     {field: 'name', title: '名称', minWidth: 100,align:'left'},
                     {field: 'phone', title: '账号', minWidth: 150,align:'left'},
                     {field: 'amount', title: '金额', minWidth: 150,align:'left'},
+                    {field: 'fromMemberName', title: '来自', minWidth: 150,align:'left'},
                     {field: 'type', title: '流水类型',
                         templet: function (d) {
                             if (d.type === 1) {
@@ -204,6 +205,7 @@
                             }
                         }, minWidth: 80,align:'center'},
                     {field: 'orderNo', title: '订单编号', minWidth: 150,align:'left'},
+                    {field: 'remark', title: '备注', minWidth: 150,align:'left'},
                     {field: 'createdTime', title: '创建时间', minWidth: 180,align:'center'}
                 ]]
             });
diff --git a/src/main/resources/templates/febs/views/modules/system/hlmScoreSet.html b/src/main/resources/templates/febs/views/modules/system/hlmScoreSet.html
index 84be52d..a2e08fc 100644
--- a/src/main/resources/templates/febs/views/modules/system/hlmScoreSet.html
+++ b/src/main/resources/templates/febs/views/modules/system/hlmScoreSet.html
@@ -24,13 +24,13 @@
                     </div>
 
                     <blockquote class="layui-elem-quote blue-border">积分与现金</blockquote>
-                    <div class="layui-form-item">
-                        <label class="layui-form-label febs-form-item-require">抵扣现金(%):</label>
-                        <div class="layui-input-block">
-                            <input type="text" name="scorePercent" lay-verify="required" placeholder="请输入数字" autocomplete="off" class="layui-input" >
-                            <div class="layui-word-aux">设置50,即商品价格1000,积分可抵扣的最大金额为1000*50%=500,填写整数,如【50】</div>
-                        </div>
-                    </div>
+<!--                    <div class="layui-form-item">-->
+<!--                        <label class="layui-form-label febs-form-item-require">抵扣现金(%):</label>-->
+<!--                        <div class="layui-input-block">-->
+<!--                            <input type="text" name="scorePercent" lay-verify="required" placeholder="请输入数字" autocomplete="off" class="layui-input" >-->
+<!--                            <div class="layui-word-aux">设置50,即商品价格1000,积分可抵扣的最大金额为1000*50%=500,填写整数,如【50】</div>-->
+<!--                        </div>-->
+<!--                    </div>-->
                     <div class="layui-form-item">
                         <label class="layui-form-label febs-form-item-require">积分兑换现金:</label>
                         <div class="layui-input-block">

--
Gitblit v1.9.1