From d98560a32c7bc106ddcd6db6e8356b9e8161845a Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Mon, 21 Nov 2022 10:26:58 +0800
Subject: [PATCH] 20221117

---
 src/main/java/cc/mrbird/febs/dapp/service/impl/DappWalletServiceImpl.java |   24 ++++++++++++------------
 src/main/resources/templates/febs/views/onhookplan/planSet.html           |   17 +++++++++++++++--
 src/main/resources/templates/febs/views/onhookplan/planList.html          |    4 ++--
 src/main/resources/templates/febs/views/dapp/teamInfo.html                |   15 ++++++++-------
 4 files changed, 37 insertions(+), 23 deletions(-)

diff --git a/src/main/java/cc/mrbird/febs/dapp/service/impl/DappWalletServiceImpl.java b/src/main/java/cc/mrbird/febs/dapp/service/impl/DappWalletServiceImpl.java
index 9233f6e..d0dcea4 100644
--- a/src/main/java/cc/mrbird/febs/dapp/service/impl/DappWalletServiceImpl.java
+++ b/src/main/java/cc/mrbird/febs/dapp/service/impl/DappWalletServiceImpl.java
@@ -604,18 +604,18 @@
          * 否则,计算收益占本金的比例。符合条件允许提现
          */
         //获取用户的总收益
-        BigDecimal totalProfitOut = igtOnHookPlanOrderItemdao.selectTotalProfitByMemberIdAndStateAndIsgoal(memberIdOut,2);
-        if(balance.compareTo(totalProfitOut) > 0){
-            BigDecimal totalAmount = dappWalletCoinEntityOut.getTotalAmount();
-            //用户总收益率
-            BigDecimal divide = totalProfitOut.divide(totalAmount,4,BigDecimal.ROUND_DOWN);
-            //提现条件收益率
-            DataDictionaryCustom outAccountProfitDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(DataDictionaryEnum.OUT_ACCOUNT_PROFIT.getType(), DataDictionaryEnum.OUT_ACCOUNT_PROFIT.getCode());
-            BigDecimal outAccountProfit = outAccountProfitDic.getValue() == null ? new BigDecimal("0.3") : new BigDecimal(outAccountProfitDic.getValue()).multiply(new BigDecimal(0.01));
-            if(divide.compareTo(outAccountProfit) < 0){
-                return new FebsResponse().fail().message(MessageSourceUtils.getString("member_err_004"));
-            }
-        }
+//        BigDecimal totalProfitOut = igtOnHookPlanOrderItemdao.selectTotalProfitByMemberIdAndStateAndIsgoal(memberIdOut,2);
+//        if(balance.compareTo(totalProfitOut) > 0){
+//            BigDecimal totalAmount = dappWalletCoinEntityOut.getTotalAmount();
+//            //用户总收益率
+//            BigDecimal divide = totalProfitOut.divide(totalAmount,4,BigDecimal.ROUND_DOWN);
+//            //提现条件收益率
+//            DataDictionaryCustom outAccountProfitDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(DataDictionaryEnum.OUT_ACCOUNT_PROFIT.getType(), DataDictionaryEnum.OUT_ACCOUNT_PROFIT.getCode());
+//            BigDecimal outAccountProfit = outAccountProfitDic.getValue() == null ? new BigDecimal("0.3") : new BigDecimal(outAccountProfitDic.getValue()).multiply(new BigDecimal(0.01));
+//            if(divide.compareTo(outAccountProfit) < 0){
+//                return new FebsResponse().fail().message(MessageSourceUtils.getString("member_err_004"));
+//            }
+//        }
         //提现次数
         DataDictionaryCustom withdrawTimesDic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(DataDictionaryEnum.WITHDRAW_TIMES.getType(), DataDictionaryEnum.WITHDRAW_TIMES.getCode());
         Integer withdrawTimes = Integer.parseInt(withdrawTimesDic.getValue());
diff --git a/src/main/resources/templates/febs/views/dapp/teamInfo.html b/src/main/resources/templates/febs/views/dapp/teamInfo.html
index 712f765..fcf2867 100644
--- a/src/main/resources/templates/febs/views/dapp/teamInfo.html
+++ b/src/main/resources/templates/febs/views/dapp/teamInfo.html
@@ -27,16 +27,17 @@
                 elem: $view.find('table'),
                 id: 'teamInfoChild',
                 url: ctx + 'member/teamInfo?parentId=1',
+                totalRow: true,
                 cols: [[
-                    {field: 'username', title: '用户名', minWidth: 100},
-                    {field: 'totalAmount', title: '总金额', minWidth: 100},
-                    {field: 'avaAmount', title: '可用金额', minWidth: 100},
-                    {field: 'FrozenAmount', title: '冻结金额', minWidth: 100},
-                    {field: 'chargeAmount', title: '充值金额', minWidth: 100},
-                    {field: 'withDrawAmount', title: '提现金额', minWidth: 100},
+                    {field: 'username', title: '用户名', minWidth: 100, totalRowText: '合计'},
+                    {field: 'totalAmount', title: '总金额', minWidth: 100, totalRow: true},
+                    {field: 'avaAmount', title: '可用金额', minWidth: 100, totalRow: true},
+                    {field: 'FrozenAmount', title: '冻结金额', minWidth: 100, totalRow: true},
+                    {field: 'chargeAmount', title: '充值金额', minWidth: 100, totalRow: true},
+                    {field: 'withDrawAmount', title: '提现金额', minWidth: 100, totalRow: true},
                     {field: 'insideAmount', title: '内转金额', minWidth: 100},
                     {field: 'onHookTimes', title: '挂机次数', minWidth: 100},
-                    {field: 'totalProfit', title: '总收益', minWidth: 100},
+                    {field: 'totalProfit', title: '总收益', minWidth: 100, totalRow: true},
                 ]]
             });
         }
diff --git a/src/main/resources/templates/febs/views/onhookplan/planList.html b/src/main/resources/templates/febs/views/onhookplan/planList.html
index 76902f2..9dc0e31 100644
--- a/src/main/resources/templates/febs/views/onhookplan/planList.html
+++ b/src/main/resources/templates/febs/views/onhookplan/planList.html
@@ -129,8 +129,8 @@
                                 return ''
                             }
                         }, minWidth: 100, align: 'center'},
-                    {field: 'planAmount', title: '挂机总金额', minWidth: 100, align: 'center'},
-                    {field: 'avaAmount', title: '剩余金额', minWidth: 120, align: 'center', totalRow: true},
+                    {field: 'planAmount', title: '挂机总金额', minWidth: 100, align: 'center', totalRow: true},
+                    {field: 'avaAmount', title: '剩余金额', minWidth: 120, align: 'center'},
                     {field: 'planCode', title: '挂机方案倍数', minWidth: 120, align: 'center'},
                     {field: 'profit', title: '总收益', minWidth: 120, align: 'center', totalRow: true},
                     {field: 'createTime', title: '时间', minWidth: 180, align: 'center'},
diff --git a/src/main/resources/templates/febs/views/onhookplan/planSet.html b/src/main/resources/templates/febs/views/onhookplan/planSet.html
index fa41a60..b8f01e4 100644
--- a/src/main/resources/templates/febs/views/onhookplan/planSet.html
+++ b/src/main/resources/templates/febs/views/onhookplan/planSet.html
@@ -22,8 +22,11 @@
                     <div class="layui-form-item">
                         <label class="layui-form-label">持续挂机时长:</label>
                         <div class="layui-input-block" style="width: 50%">
-                            <input type="text" name="maxHours"
-                                   lay-verify="" autocomplete="off" class="layui-input" >
+<!--                            <input type="text" name="maxHours"-->
+<!--                                   lay-verify="" autocomplete="off" class="layui-input" >-->
+
+                            <input type="text" name="maxHours" onkeyup="value=value.replace(/^\D*(\d*(?:\.\d{0,2})?).*$/g, '$1')" class="layui-input"/>
+<!--                            <input type="text"  lay-verify="number" name="maxHours" value="0.000" onblur="value=zhzs(this.value)" class="layui-input"/>-->
                         </div>
                         <div class="layui-input-block">
                             <div class="layui-form-mid layui-word-aux">持续挂机时长表示:不手动点击结束的自动挂机时长</div>
@@ -108,5 +111,15 @@
             });
             return false;
         });
+        /*自定义处理数字*/
+        function zhzs(value) {
+            value = value.replace(/[^\d]/g, '').replace(/^0{1,}/g, '');
+            if (value != '')
+                value = parseFloat(value).toFixed(3);
+            else
+                value = parseFloat(0).toFixed(3);
+            return value;
+        }
+
     });
 </script>
\ No newline at end of file

--
Gitblit v1.9.1