From 47595c81b8205b3fad148e0d90551c38e9adb9ec Mon Sep 17 00:00:00 2001 From: chenzhi Date: Thu, 26 Dec 2019 20:38:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=85=AC=E4=BC=9A=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E5=85=AC=E5=8F=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FinancePromoteController.class.php | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/Application/Admin/Controller/FinancePromoteController.class.php b/Application/Admin/Controller/FinancePromoteController.class.php index 9e4cf147a..0ba98edde 100644 --- a/Application/Admin/Controller/FinancePromoteController.class.php +++ b/Application/Admin/Controller/FinancePromoteController.class.php @@ -56,19 +56,19 @@ class FinancePromoteController extends AdminController $senddata[$v['p_id']] = $v; }; } - if(array_key_exists(0,$senddata) || $_REQUEST['promote_id']==0){ - $pmap['status']=1; - if($istimeselect){ - $pmap['create_time'] = $istimeselect; - } - $admininside = M("provide_user p","tab_")->field("sum(amount) amount")->where($pmap)->find(); - if($admininside['amount'] >0){ - $senddata[0]['inside_cash_count']= $admininside['amount']; + if(!empty($senddata)){ + if(array_key_exists(0,$senddata) || $_REQUEST['promote_id']==0){ + $pmap['status']=1; + if($istimeselect){ + $pmap['create_time'] = $istimeselect; + } + $admininside = M("provide_user p","tab_")->field("sum(amount) amount")->where($pmap)->find(); + if($admininside['amount'] >0){ + $senddata[0]['inside_cash_count']= $admininside['amount']; + } + } - } - - $data = []; $count =array( "cash_count"=>0, @@ -132,6 +132,9 @@ class FinancePromoteController extends AdminController } } } + if (isset($_REQUEST['company_id'])) { + $map['promote.company_id'] = $_REQUEST['company_id']; + } if($type == "spend"){ if (isset($_REQUEST['game_name']) || isset($_REQUEST['game_type'])) { $map["s.game_id"] = array("in",implode(',', array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['game_type']), 'id')) );