From 82784f9da97d396b758aa428af986a5561c00212 Mon Sep 17 00:00:00 2001 From: chenxiaojun <956334972@qq.com> Date: Thu, 9 Jan 2020 18:00:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E6=8F=90=E7=8E=B0--=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Controller/QueryController.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Application/Admin/Controller/QueryController.class.php b/Application/Admin/Controller/QueryController.class.php index 0db76311e..005150651 100644 --- a/Application/Admin/Controller/QueryController.class.php +++ b/Application/Admin/Controller/QueryController.class.php @@ -83,6 +83,8 @@ class QueryController extends ThinkController $this->assign('settlementTypeList', $settlementTypeList); $this->display();die; } + } else { + $spendMap['tab_spend.selle_status'] = 0; } $sortBy = I('sort_by', ''); @@ -100,7 +102,6 @@ class QueryController extends ThinkController } $spendMap['tab_spend.pay_status'] = 1; - $spendMap['tab_spend.selle_status'] = 0; $spendMap['tab_spend.pay_time'] = ['between', [$beginTime, $endTime]]; $spendMap['tab_spend.promote_id'] = ['in', $promoteIds]; $spendField = "tab_spend.game_id, tab_spend.game_name, sum(tab_spend.pay_amount) as sum_amount, tab_spend.selle_ratio, sum(if(tab_spend.selle_ratio > 0, tab_spend.pay_amount * tab_spend.selle_ratio, 0)) as settlement_amount, FROM_UNIXTIME(tab_spend.`pay_time`, '%Y-%m-%d') as day"; @@ -144,6 +145,7 @@ class QueryController extends ThinkController $zTotal = null_to_0(M('spend', 'tab_')->field($totalField)->where($spendMap)->find()['settlement_amount']);//累计 $zTotal = bcdiv($zTotal, 100 ,2); } else { + $spendMap['game_id'] = 157; $totalField = 'sum(tab_spend.pay_amount) as sum_amount'; $zTotal = null_to_0(M('spend', 'tab_')->field($totalField)->where($spendMap)->find()['sum_amount']);//累计 }