From 4d1cfb36ec4d5a4bc7106fd93020ce609518fb46 Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Wed, 19 Feb 2020 16:09:06 +0800 Subject: [PATCH 01/10] =?UTF-8?q?=E7=94=9F=E6=88=90=E4=B8=8B=E6=B8=B8?= =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E7=BB=93=E7=AE=97=E5=8D=95bug=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/StatementMangementController.class.php | 2 ++ Application/Admin/View/StatementMangement/PersonOrderEdit.html | 1 + 2 files changed, 3 insertions(+) diff --git a/Application/Admin/Controller/StatementMangementController.class.php b/Application/Admin/Controller/StatementMangementController.class.php index 4714782a8..b26cf9d3d 100644 --- a/Application/Admin/Controller/StatementMangementController.class.php +++ b/Application/Admin/Controller/StatementMangementController.class.php @@ -795,6 +795,8 @@ class StatementMangementController extends ThinkController $is_save = M('statement','tab_')->where(['id'=>$_REQUEST['withdraw_id']])->save($data); +// echo M('statement','tab_')->_sql();die(); + if ($is_save) { $this->ajaxReturn(['status'=>1,'msg'=>'修改成功']); } else { diff --git a/Application/Admin/View/StatementMangement/PersonOrderEdit.html b/Application/Admin/View/StatementMangement/PersonOrderEdit.html index 37b7545eb..6f6dde828 100644 --- a/Application/Admin/View/StatementMangement/PersonOrderEdit.html +++ b/Application/Admin/View/StatementMangement/PersonOrderEdit.html @@ -80,6 +80,7 @@
+  - 
From 9edc77beadbfcb235006fdb15d2c6063e404a7be Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Wed, 19 Feb 2020 16:28:21 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E7=94=9F=E6=88=90=E4=B8=8B=E6=B8=B8?= =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E7=BB=93=E7=AE=97=E5=8D=95bug=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/StatementMangementController.class.php | 7 +++++-- .../Admin/View/StatementMangement/PersonOrderEdit.html | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Controller/StatementMangementController.class.php b/Application/Admin/Controller/StatementMangementController.class.php index b26cf9d3d..40b6eaedb 100644 --- a/Application/Admin/Controller/StatementMangementController.class.php +++ b/Application/Admin/Controller/StatementMangementController.class.php @@ -609,7 +609,7 @@ class StatementMangementController extends ThinkController $statement = M('statement','tab_') ->field('ext_field') - ->where(['ext_field'=>['like','%,%']]) + ->where(['statement_type'=>2]) ->select(); $withdrawData = []; @@ -624,7 +624,10 @@ class StatementMangementController extends ThinkController } - $thisWithdraw = explode(',',$_REQUEST['withdraw']); +// $thisWithdraw = explode(',',$_REQUEST['withdraw']); + $thisWithdraw = explode(',',M('statement','tab_')->where(['id'=>$_REQUEST['id']])->find()['ext_field']); +// dump($thisWithdraw);die(); + foreach ($data as $key => $value) { // $data[$key]['settlement_begin_time'] = date("Y-m-d H:i:s", $data[$key]['settlement_begin_time']); diff --git a/Application/Admin/View/StatementMangement/PersonOrderEdit.html b/Application/Admin/View/StatementMangement/PersonOrderEdit.html index 6f6dde828..1d2643564 100644 --- a/Application/Admin/View/StatementMangement/PersonOrderEdit.html +++ b/Application/Admin/View/StatementMangement/PersonOrderEdit.html @@ -80,7 +80,7 @@
- +  - 
@@ -278,6 +278,7 @@ return $(elem).val(); }).get().join(","); var id =$("#withdraw_id").val(); + var withdraw =$("#withdraw").val(); var url = "/admin.php?s=/statementMangement/PersonOrderEdit/withdraw/" + text + "/time_start/" + $("#time_start").val() + "/time_end/" + $("#time_end").val() + "/id/" + id; console.log(url) From fa92868548c1e8bd25b6734ffd45b95847bfbe97 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Wed, 19 Feb 2020 16:37:32 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=85=AC=E4=BC=9A?= =?UTF-8?q?=E7=BB=9F=E8=AE=A1=E5=9B=A2=E4=BD=93=E5=8D=A0=E6=AF=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/View/FinancePromote/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Admin/View/FinancePromote/index.html b/Application/Admin/View/FinancePromote/index.html index 2e1ae29a4..1e4a00369 100644 --- a/Application/Admin/View/FinancePromote/index.html +++ b/Application/Admin/View/FinancePromote/index.html @@ -258,7 +258,7 @@ 内外团占比: - 内团充值金额占比:{$insideBelong}%    外团充值金额占比:{$outBelong}% + 内团充值金额占比:{$insideBelong}%    其他团体充值金额占比:{$outBelong}% From 3d35ce37696f0ad756bbf3fc472136eb7c8d8b62 Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Wed, 19 Feb 2020 16:45:51 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=B9=B3=E5=8F=B0>?= =?UTF-8?q?=E8=B4=A2=E5=8A=A1=E7=AE=A1=E7=90=86>=E7=BB=93=E7=AE=97?= =?UTF-8?q?=E4=B8=AD=E5=BF=83--=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/FinanceController.class.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Application/Home/Controller/FinanceController.class.php b/Application/Home/Controller/FinanceController.class.php index 9bf7327c1..750d97afb 100644 --- a/Application/Home/Controller/FinanceController.class.php +++ b/Application/Home/Controller/FinanceController.class.php @@ -121,19 +121,20 @@ class FinanceController extends BaseController sum(if(pay_time >= $thisMonth, if(selle_ratio > 0, pay_amount * selle_ratio, 0), 0)) as this_month_income, sum(if((pay_time >= $yesterday and pay_time < $thisDay), if(selle_ratio > 0, pay_amount * selle_ratio, 0), 0)) as yesterday_income, sum(if(pay_time < $thisDay, if(selle_status = 0, pay_amount * selle_ratio, 0), 0)) as balance, - sum(if(selle_status = 0, pay_amount, 0)) as not_withdrawn_amount") + sum(if(selle_status = 0, pay_amount * selle_ratio, 0)) as not_withdrawn_amount") ->where($map) ->find(); + foreach ($income as &$value) { + $value = bcdiv($value, 100, 2); + } + $withdrawMap['promote_id'] = $this->loginPromote['id']; $withdrawMap['status'] = ['neq', 2]; //已提现总额 $income['withdrawn_amount'] = M('withdraw', 'tab_')->field('sum(sum_money) as withdrawn_amount')->where($withdrawMap)->find()['withdrawn_amount']; - - foreach ($income as &$value) { - $value = bcdiv($value, 100, 2); - } + $income['withdrawn_amount'] = $income['withdrawn_amount'] ?? '0.00'; $withdrawMap['status'] = ['not in', [-2, -1]]; $withdrawns = M('withdraw', 'tab_')->field('settlement_begin_time, settlement_end_time') From 578948347f4c73ef23a585f7998c6563a0885821 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Wed, 19 Feb 2020 16:53:08 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=85=AC=E4=BC=9A?= =?UTF-8?q?=E5=86=85=E5=A4=96=E5=9B=A2=E5=8D=A0=E6=AF=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/FinancePromoteController.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Application/Admin/Controller/FinancePromoteController.class.php b/Application/Admin/Controller/FinancePromoteController.class.php index 5f98c6d27..c910dc112 100644 --- a/Application/Admin/Controller/FinancePromoteController.class.php +++ b/Application/Admin/Controller/FinancePromoteController.class.php @@ -149,10 +149,10 @@ class FinancePromoteController extends AdminController $insideBelong = 0; foreach ($data as $key => $value) { - if ($value['company_belong']=='外团') { - $outBelong+=$value['allcount']; - } else { + if ($value['company_belong']=='内团') { $insideBelong+=$value['allcount']; + } else { + $outBelong+=$value['allcount']; } } From 23f38f6a07406a82f8ba394ac1de80edc5b2ae06 Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Wed, 19 Feb 2020 17:08:56 +0800 Subject: [PATCH 06/10] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=B9=B3=E5=8F=B0>?= =?UTF-8?q?=E8=B4=A2=E5=8A=A1=E7=AE=A1=E7=90=86>=E7=BB=93=E7=AE=97?= =?UTF-8?q?=E4=B8=AD=E5=BF=83--=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/View/Promote/lists.html | 3 +++ Application/Home/Controller/FinanceController.class.php | 6 +++++- Application/Home/View/default/Finance/index.html | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Application/Admin/View/Promote/lists.html b/Application/Admin/View/Promote/lists.html index d98c32800..014df7416 100644 --- a/Application/Admin/View/Promote/lists.html +++ b/Application/Admin/View/Promote/lists.html @@ -299,6 +299,9 @@ 删除 + + 资质认证 + diff --git a/Application/Home/Controller/FinanceController.class.php b/Application/Home/Controller/FinanceController.class.php index 750d97afb..f737e5324 100644 --- a/Application/Home/Controller/FinanceController.class.php +++ b/Application/Home/Controller/FinanceController.class.php @@ -130,11 +130,15 @@ class FinanceController extends BaseController } $withdrawMap['promote_id'] = $this->loginPromote['id']; - $withdrawMap['status'] = ['neq', 2]; + $withdrawMap['status'] = 2; //已提现总额 $income['withdrawn_amount'] = M('withdraw', 'tab_')->field('sum(sum_money) as withdrawn_amount')->where($withdrawMap)->find()['withdrawn_amount']; + $withdrawMap['status'] = ['in', [-1, 0, 1]]; + $notWithdrawnAmount = M('withdraw', 'tab_')->field('sum(sum_money) as withdrawn_amount')->where($withdrawMap)->find()['withdrawn_amount']; $income['withdrawn_amount'] = $income['withdrawn_amount'] ?? '0.00'; + $notWithdrawnAmount = $notWithdrawnAmount ?? 0; + $income['not_withdrawn_amount'] = bcadd($income['not_withdrawn_amount'], $notWithdrawnAmount, 2); $withdrawMap['status'] = ['not in', [-2, -1]]; $withdrawns = M('withdraw', 'tab_')->field('settlement_begin_time, settlement_end_time') diff --git a/Application/Home/View/default/Finance/index.html b/Application/Home/View/default/Finance/index.html index 63f96312b..ae9906f67 100644 --- a/Application/Home/View/default/Finance/index.html +++ b/Application/Home/View/default/Finance/index.html @@ -34,8 +34,8 @@
  • 账户余额

    ¥{$income.balance}
    • -
    • 已提现总金额

      ¥{$income.withdrawn_amount}
    • -
    • 未提现金额

      ¥{$income.not_withdrawn_amount}
    • +
    • 已实际提现总金额

      ¥{$income.withdrawn_amount}
    • +
    • 未实际提现金额

      ¥{$income.not_withdrawn_amount}
    • 结算周期

      {$settlementCycle}
    From 43b50387786269073326e6df9aeb5be20b7185e8 Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Wed, 19 Feb 2020 18:39:55 +0800 Subject: [PATCH 07/10] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=B9=B3=E5=8F=B0>?= =?UTF-8?q?=E8=B4=A2=E5=8A=A1=E7=AE=A1=E7=90=86>=E7=BB=93=E7=AE=97?= =?UTF-8?q?=E4=B8=AD=E5=BF=83--=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controller/FinanceController.class.php | 102 +++++++++++++++++- 1 file changed, 97 insertions(+), 5 deletions(-) diff --git a/Application/Home/Controller/FinanceController.class.php b/Application/Home/Controller/FinanceController.class.php index f737e5324..c42acad92 100644 --- a/Application/Home/Controller/FinanceController.class.php +++ b/Application/Home/Controller/FinanceController.class.php @@ -34,13 +34,23 @@ class FinanceController extends BaseController return true; } - private function getDayList($beginTime, $endTime) + private function getDayList($beginTime, $endTime, $timeType = 1) { $dayList = []; - do { - $dayList[] = date('Y-m-d', $beginTime); - $beginTime += 24 * 60 * 60; - } while ($beginTime < $endTime); + switch ($timeType) { + case 1: + do { + $dayList[] = date('Y-m-d', $beginTime); + $beginTime += 24 * 60 * 60; + } while ($beginTime < $endTime); + break; + case 2: + do { + $dayList[] = date('Y-m', $beginTime); + $beginTime = strtotime('+1 month', $beginTime); + } while ($beginTime < $endTime); + break; + } return $dayList; } @@ -139,6 +149,7 @@ class FinanceController extends BaseController $income['withdrawn_amount'] = $income['withdrawn_amount'] ?? '0.00'; $notWithdrawnAmount = $notWithdrawnAmount ?? 0; $income['not_withdrawn_amount'] = bcadd($income['not_withdrawn_amount'], $notWithdrawnAmount, 2); + $income['not_withdrawn_amount'] = bcadd($income['not_withdrawn_amount'], $this->getNotWithdrawnAmount(), 2); $withdrawMap['status'] = ['not in', [-2, -1]]; $withdrawns = M('withdraw', 'tab_')->field('settlement_begin_time, settlement_end_time') @@ -196,6 +207,87 @@ class FinanceController extends BaseController $this->display(); } + public function getNotWithdrawnAmount() + { + $thisMonth = strtotime(date('Y-m')); + $map['promote_id'] = $this->loginPromote['id']; + $map['status'] = 1; + $map['begin_time'] = ['elt', $thisMonth]; + $promoteGameRatios = M('promote_game_ratio', 'tab_')->field('game_id, begin_time, end_time, ratio, turnover_ratio') + ->where($map) + ->select(); + + if (empty($promoteGameRatios)) { + return 0; + } else { + $income = 0; + $map['status'] = ['neq', -2]; + $map['settlement_type'] = ['in', [2, 3]]; + unset($map['begin_time']); + $withdrawDays = M('withdraw', 'tab_')->where($map)->getField('settlement_begin_time', true); + if ($withdrawDays) { + foreach ($withdrawDays as &$withdrawDay) { + $withdrawDay = date('Y-m', $withdrawDay); + } + } else { + $withdrawDays = []; + } + foreach ($promoteGameRatios as $promoteGameRatio) { + $map = []; + $map['game_id'] = $promoteGameRatio['game_id']; + $promoteGameRatio['turnover_ratio'] = json_decode($promoteGameRatio['turnover_ratio'], true); + $days = $this->getDayList($promoteGameRatio['begin_time'], $thisMonth, 2); + if ($days) { + foreach ($days as $day) { + if (!in_array($day, $withdrawDays)) { + $day = strtotime($day); + $map['pay_time'] = ['between', [$day, strtotime('+1 month', $day) - 1]]; + $sumAmount = $this->getSumMoney($map); + $diffRatio = $this->getDiffRatio($sumAmount, $promoteGameRatio['ratio'], $promoteGameRatio['turnover_ratio']); + $income += bcmul($sumAmount, bcdiv($diffRatio, 100, 2), 2); + } + } + } + } + } + + return $income; + } + + private function getSumMoney($map = []) + { + $map['pay_status'] = 1; + + $sumAmount = M('spend', 'tab_')->field('sum(pay_amount) as sum_amount')->where($map)->find()['sum_amount']; + $sumAmount = $sumAmount ?? 0; + return $sumAmount; + } + + private function getDiffRatio($sumAmount, $defaultRatio, $turnoverRatios) + { + if ($turnoverRatios) { + $ratio = $defaultRatio; + foreach ($turnoverRatios as $turnoverRatio) { + if (empty($turnoverRatio['instanceof']) || $turnoverRatio['instanceof'] == 1) { + if ($sumAmount >= $turnoverRatio['turnover']) { + $ratio = $turnoverRatio['ratio']; + break; + } + } else { + if ($sumAmount > $turnoverRatio['turnover']) { + $ratio = $turnoverRatio['ratio']; + break; + } + } + } + + $ratio = bcsub($ratio - $defaultRatio, 2); + return $ratio; + } + + return 0; + } + //结算明细 public function settlementDtl() { From 118aae4f8313fe9fdc6d4cd924113f7c0533adc6 Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Wed, 19 Feb 2020 19:43:47 +0800 Subject: [PATCH 08/10] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=B9=B3=E5=8F=B0>?= =?UTF-8?q?=E8=B4=A2=E5=8A=A1=E7=AE=A1=E7=90=86>=E7=BB=93=E7=AE=97?= =?UTF-8?q?=E4=B8=AD=E5=BF=83--=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Model/WithdrawModel.class.php | 4 +- .../Controller/FinanceController.class.php | 41 +++++++++++++++++-- 2 files changed, 39 insertions(+), 6 deletions(-) diff --git a/Application/Admin/Model/WithdrawModel.class.php b/Application/Admin/Model/WithdrawModel.class.php index 75b82fb75..a591165cb 100644 --- a/Application/Admin/Model/WithdrawModel.class.php +++ b/Application/Admin/Model/WithdrawModel.class.php @@ -498,7 +498,7 @@ class WithdrawModel extends Model{ { $promoteGameRatioMap['status'] = 1; $promoteGameRatioMap['promote_id'] = $promote['id']; - $promoteGameRatios = D('promote_game_ratio')->field('game_id, ratio, turnover_ratio, begin_time, end_time') + $promoteGameRatios = M('promote_game_ratio', 'tab_')->field('game_id, ratio, turnover_ratio, begin_time, end_time') ->where($promoteGameRatioMap) ->order('update_time desc') ->select(); @@ -566,7 +566,7 @@ class WithdrawModel extends Model{ $promoteGameRatioMap['status'] = 1; $promoteGameRatioMap['promote_id'] = $promote['id']; - $promoteGameRatios = D('promote_game_ratio')->field('game_id, ratio, turnover_ratio, begin_time, end_time') + $promoteGameRatios = M('promote_game_ratio', 'tab_')->field('game_id, ratio, turnover_ratio, begin_time, end_time') ->where($promoteGameRatioMap) ->order('update_time desc') ->select(); diff --git a/Application/Home/Controller/FinanceController.class.php b/Application/Home/Controller/FinanceController.class.php index c42acad92..dd031d65c 100644 --- a/Application/Home/Controller/FinanceController.class.php +++ b/Application/Home/Controller/FinanceController.class.php @@ -130,8 +130,7 @@ class FinanceController extends BaseController $income = $model->field("sum(if(pay_time < $thisDay, if(selle_ratio > 0, pay_amount * selle_ratio, 0), 0)) as history_income, sum(if(pay_time >= $thisMonth, if(selle_ratio > 0, pay_amount * selle_ratio, 0), 0)) as this_month_income, sum(if((pay_time >= $yesterday and pay_time < $thisDay), if(selle_ratio > 0, pay_amount * selle_ratio, 0), 0)) as yesterday_income, - sum(if(pay_time < $thisDay, if(selle_status = 0, pay_amount * selle_ratio, 0), 0)) as balance, - sum(if(selle_status = 0, pay_amount * selle_ratio, 0)) as not_withdrawn_amount") + sum(if(pay_time < $thisDay, if(selle_status = 0, pay_amount * selle_ratio, 0), 0)) as balance") ->where($map) ->find(); @@ -148,8 +147,7 @@ class FinanceController extends BaseController $notWithdrawnAmount = M('withdraw', 'tab_')->field('sum(sum_money) as withdrawn_amount')->where($withdrawMap)->find()['withdrawn_amount']; $income['withdrawn_amount'] = $income['withdrawn_amount'] ?? '0.00'; $notWithdrawnAmount = $notWithdrawnAmount ?? 0; - $income['not_withdrawn_amount'] = bcadd($income['not_withdrawn_amount'], $notWithdrawnAmount, 2); - $income['not_withdrawn_amount'] = bcadd($income['not_withdrawn_amount'], $this->getNotWithdrawnAmount(), 2); + $income['not_withdrawn_amount'] = bcadd($this->getSumAmountBySettlementType(), $notWithdrawnAmount, 2); $withdrawMap['status'] = ['not in', [-2, -1]]; $withdrawns = M('withdraw', 'tab_')->field('settlement_begin_time, settlement_end_time') @@ -207,6 +205,41 @@ class FinanceController extends BaseController $this->display(); } + public function getSumAmountBySettlementType() + { + $withdrawModel = new WithdrawModel(); + $balance = 0; + + if ($this->loginPromote['settlement_type'] == 2) { + $settlementType = 2; + } else { + $map['pay_status'] = 1; + $map['selle_status'] = 0; + $balance = M('spend', 'tab_')->field('sum(pay_amount * selle_ratio) as balance')->where($map)->find()['balance']; + $balance = $balance ? bcdiv($balance , 100, 2) : 0; + $settlementType = 3; + } + + $months = $this->getDayList(strtotime('2019-09'), strtotime(date('Y-m')), 2); + $promote = $this->loginPromote; + + if ($settlementType == 2) { + $fun = 'getMonthAmount'; + } else { + $fun = 'getRecoupAmount'; + } + + if ($months) { + foreach ($months as $month) { + $data['begin_time'] = strtotime($month); + $data['end_time'] = strtotime('+1 month', $data['begin_time']) - 1; + $balance = bcadd($balance, $withdrawModel->$fun($promote, $data)); + } + } + + return $balance; + } + public function getNotWithdrawnAmount() { $thisMonth = strtotime(date('Y-m')); From ae9293e2060dbd763fee42d82911bc240b12136b Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Wed, 19 Feb 2020 19:50:10 +0800 Subject: [PATCH 09/10] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=B9=B3=E5=8F=B0>?= =?UTF-8?q?=E8=B4=A2=E5=8A=A1=E7=AE=A1=E7=90=86>=E7=BB=93=E7=AE=97?= =?UTF-8?q?=E4=B8=AD=E5=BF=83--=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Home/Controller/FinanceController.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Application/Home/Controller/FinanceController.class.php b/Application/Home/Controller/FinanceController.class.php index dd031d65c..d65b914f6 100644 --- a/Application/Home/Controller/FinanceController.class.php +++ b/Application/Home/Controller/FinanceController.class.php @@ -233,7 +233,7 @@ class FinanceController extends BaseController foreach ($months as $month) { $data['begin_time'] = strtotime($month); $data['end_time'] = strtotime('+1 month', $data['begin_time']) - 1; - $balance = bcadd($balance, $withdrawModel->$fun($promote, $data)); + $balance = bcadd($balance, $withdrawModel->$fun($promote, $data), 2); } } From daec62ec958a04dfca7d032accf4d27519fd6d85 Mon Sep 17 00:00:00 2001 From: liuweiwen <“529520975@qq.com> Date: Thu, 20 Feb 2020 09:20:37 +0800 Subject: [PATCH 10/10] =?UTF-8?q?=E5=A5=96=E7=BD=9A=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E7=AE=A1=E7=90=86-=E3=80=8B=E7=BC=96=E8=BE=91=EF=BC=8C?= =?UTF-8?q?=E6=97=A0=E4=BF=AE=E6=94=B9=E6=97=B6=E6=8F=90=E7=A4=BA=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/StatementMangementController.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Application/Admin/Controller/StatementMangementController.class.php b/Application/Admin/Controller/StatementMangementController.class.php index 40b6eaedb..f6e986469 100644 --- a/Application/Admin/Controller/StatementMangementController.class.php +++ b/Application/Admin/Controller/StatementMangementController.class.php @@ -316,7 +316,11 @@ class StatementMangementController extends ThinkController } if ($id) { $upt = M('reward_record', 'tab_')->where(['id'=>$id])->save($data); - return $upt ? $this->success('更新成功', U('StatementMangement/rewardManageList')) : $this->error('更新失败'); + if ($upt === false) { + $this->error('保存失败'); + } else { + $this->success('保存成功', U('StatementMangement/rewardManageList')); + } } else { $data['create_time'] = time(); $data['creater_id'] = is_login();