From 0b3e5032bb6e9151c885de8dc62c930d96817974 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Thu, 26 Aug 2021 14:22:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=9B=B4=E6=96=B0=E6=97=B6?= =?UTF-8?q?=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/StatementWarningController.class.php | 8 +++++--- .../Controller/StatementWarningSetController.class.php | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Application/Admin/Controller/StatementWarningController.class.php b/Application/Admin/Controller/StatementWarningController.class.php index 7c3b24180..90804400d 100644 --- a/Application/Admin/Controller/StatementWarningController.class.php +++ b/Application/Admin/Controller/StatementWarningController.class.php @@ -52,10 +52,12 @@ class StatementWarningController extends AdminController } private function getLastUpdate() - { + { + $preMonth = explode('-',date('Y-m',mktime(0,0,0,date('m',time()),1,date('Y',time()))-1)); + $lastUpdate = $this->statementWarningModel->where([ - 'count_year'=>$_REQUEST['year'], - 'count_month'=>date('m',time()), + 'count_year'=>$preMonth[0], + 'count_month'=>$preMonth[1], "name"=>'wm_platm', "type"=>1 ])->field("create_time")->find(); diff --git a/Application/Admin/Controller/StatementWarningSetController.class.php b/Application/Admin/Controller/StatementWarningSetController.class.php index 50944c8c3..4591b3c82 100644 --- a/Application/Admin/Controller/StatementWarningSetController.class.php +++ b/Application/Admin/Controller/StatementWarningSetController.class.php @@ -183,7 +183,7 @@ class StatementWarningSetController extends Controller { //获取官方渠道 $merchantIds = M("payment_merchant","tab_")->group('main_id')->where("main_id = 1")->getField("GROUP_CONCAT(id) ids"); $where = [ - 'merchant_way'=>['in',$merchantIds], + 'merchant_id'=>['in',$merchantIds], 'pay_status'=>1, 'payed_time'=>['between',[$this->beginThismonth,$this->endThismonth]], ];