From 3983a086acfa3a4bd34e31e3828d33a3386731f0 Mon Sep 17 00:00:00 2001 From: chenzhi <“chenzhi063@qq.com> Date: Thu, 31 Oct 2019 17:04:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=94=9F=E6=88=90=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/SpendCountSetController.class.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Application/Admin/Controller/SpendCountSetController.class.php b/Application/Admin/Controller/SpendCountSetController.class.php index 31cedc7de..4ce2cc5ba 100644 --- a/Application/Admin/Controller/SpendCountSetController.class.php +++ b/Application/Admin/Controller/SpendCountSetController.class.php @@ -590,11 +590,14 @@ class SpendCountSetController extends \Think\Controller { $map = array( "create_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)), + "status"=>1 ); $add = M("provide_user","tab_")->field("sum(amount) amount")->where($map)->find()['amount']; $add || $add=0; - $jq = M("user_coin","tab_")->field("sum(num) num")->where($map)->find()['num']; + $jq = M("user_coin","tab_")->field("sum(num) num")->where(array( + "create_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)) + ))->find()['num']; $jq || $jq=0; return $add-$jq; } @@ -603,11 +606,14 @@ class SpendCountSetController extends \Think\Controller { $map = array( "create_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)), + "status"=>1 ); $add = M("provide","tab_")->field("sum(amount) amount")->where($map)->find()['amount']; $add || $add=0; - $jq = M("deduct_bind_record","tab_")->field("sum(quantity) quantity")->where($map)->find()['quantity']; + $jq = M("deduct_bind_record","tab_")->field("sum(quantity) quantity")->where(array( + "create_time"=> array('BETWEEN',array($this->beginThismonth, $this->endThismonth)) + ))->find()['quantity']; $jq || $jq=0; return $add-$jq; }