From 6307625efc6b136657f62001b35babe17246b35b Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Fri, 8 Nov 2019 18:08:30 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=90=8E=E5=8F=B0->=E6=8E=A8?= =?UTF-8?q?=E5=B9=BF=E5=91=98->=E7=BB=93=E7=AE=97=E7=AE=A1=E7=90=86->?= =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E6=8F=90=E7=8E=B0->--=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Common/function.php | 9 +++++++++ Application/Admin/Controller/QueryController.class.php | 7 +++---- Application/Admin/View/Query/withdraw.html | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/Application/Admin/Common/function.php b/Application/Admin/Common/function.php index dfb6b2a4c..c893201f0 100644 --- a/Application/Admin/Common/function.php +++ b/Application/Admin/Common/function.php @@ -569,3 +569,12 @@ function getTopPromote($promote_id) return M('promote', 'tab_')->where(['id' => $topPromoteId])->find(); } } + +function arrayPromoteWithdrawStatus($status, $param, $array = array()) { + foreach ($array as $key => $value) { + if($value[$status] == -1){ + unset($array[$key]); + } + } + return $array; +} \ No newline at end of file diff --git a/Application/Admin/Controller/QueryController.class.php b/Application/Admin/Controller/QueryController.class.php index 83d911277..811ef56b4 100644 --- a/Application/Admin/Controller/QueryController.class.php +++ b/Application/Admin/Controller/QueryController.class.php @@ -682,16 +682,15 @@ class QueryController extends ThinkController 'title' => '渠道提现', 'template_list' => 'withdraw', ); - $map1 = array('status' => 1); + $map1 = array('status' => ['neq', -1]); $total = null_to_0(D('withdraw')->where($map1)->sum('sum_money')); - $ttotal = null_to_0(D('withdraw')->where('end_time' . total(1))->where($map1)->sum('sum_money')); - $ytotal = null_to_0(D('withdraw')->where('end_time' . total(5))->where($map1)->sum('sum_money')); + $ttotal = null_to_0(D('withdraw')->where('create_time' . total(1))->where($map1)->sum('sum_money')); + $ytotal = null_to_0(D('withdraw')->where('create_time' . total(5))->where($map1)->sum('sum_money')); $this->assign('total', $total); $this->assign('ttotal', $ttotal); $this->assign('ytotal', $ytotal); $user = A('Bill', 'Event'); - $this->m_title = '推广提现'; $this->assign('commonset', M('Kuaijieicon')->where(['url' => 'Query/withdraw', 'status' => 1])->find()); diff --git a/Application/Admin/View/Query/withdraw.html b/Application/Admin/View/Query/withdraw.html index e4d233f10..164fd02da 100644 --- a/Application/Admin/View/Query/withdraw.html +++ b/Application/Admin/View/Query/withdraw.html @@ -155,7 +155,7 @@ 汇总 - 当页提现:{:null_to_0(array_sum(array_column(array_status2value('status','',$list_data),'sum_money')))}元 ; 今日提现:{:null_to_0(floor($ttotal*100)/100)}元 ; 昨日提现:{:null_to_0(floor($ytotal*100)/100)}元 ; 累计提现:{:null_to_0(floor($total*100)/100)}元 + 当页提现:{:null_to_0(array_sum(array_column(arrayPromoteWithdrawStatus('status','',$list_data),'sum_money')))}元 ; 今日提现:{:null_to_0(floor($ttotal*100)/100)}元 ; 昨日提现:{:null_to_0(floor($ytotal*100)/100)}元 ; 累计提现:{:null_to_0(floor($total*100)/100)}元