From 876952f3b49a006bdc6953abdada9156adc8c3a0 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Fri, 3 Jan 2020 16:25:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=AC=E4=BC=9A=E7=BB=9F=E8=AE=A1=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=86=85=E5=A4=96=E5=9B=A2=E6=A3=80=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../FinancePromoteController.class.php | 39 ++++++++++++------- .../Admin/View/FinancePromote/index.html | 9 +++++ 2 files changed, 34 insertions(+), 14 deletions(-) diff --git a/Application/Admin/Controller/FinancePromoteController.class.php b/Application/Admin/Controller/FinancePromoteController.class.php index c73b551ce..e455f2eae 100644 --- a/Application/Admin/Controller/FinancePromoteController.class.php +++ b/Application/Admin/Controller/FinancePromoteController.class.php @@ -63,11 +63,18 @@ class FinancePromoteController extends AdminController //判断公司 $gfidlag = true; $gfgs = true; + $nwtflag = true; if (isset($_REQUEST['company_id'])) { if($_REQUEST['company_id']!=0){ $gfgs = false; } } + //判断是否是内团 内团才有官方 + if(isset($_REQUEST['company_belong'])){ + if($_REQUEST['company_belong']!=0){ + $nwtflag = false; + } + } if (isset($_REQUEST['promote_id'])) { if($_REQUEST['promote_id'] == 0){ $gfidlag = true; @@ -75,28 +82,26 @@ class FinancePromoteController extends AdminController $gfidlag =false; } } - if($gfidlag && $gfgs){ + // dd($gfidlag && $gfgs && $nwtflag); + if($gfidlag && $gfgs && $nwtflag){ //计算官方渠道 unset($_REQUEST['company_id']); + unset($_REQUEST['company_belong']); $_REQUEST['promote_id'] = 0; $gfcash = self::getJoinPromoteData([],$istimeselect); $senddata[0] = $gfcash[0]; - } - if(!empty($senddata)){ - if(array_key_exists(0,$senddata) || $_REQUEST['promote_id']==0){ - if (empty($_REQUEST['company_id'])) { - $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']; - } - } + $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, @@ -174,6 +179,7 @@ class FinancePromoteController extends AdminController private function getJoinPromoteData($map,$istimeselect,$type="spend") { // setPowerPromoteIds($map,"s.promote_id"); + //推广员相关检索 if (isset($_REQUEST['promote_id'])) { if ($_REQUEST['promote_id'] == 0) { $map['s.promote_id'] = 0; @@ -188,6 +194,11 @@ class FinancePromoteController extends AdminController $map['promote.company_id'] = $_REQUEST['company_id']; } + if (isset($_REQUEST['company_belong'])) { + $map['promote.company_belong'] = $_REQUEST['company_belong']; + + } + if($type == "spend"){ if (isset($_REQUEST['game_name']) || isset($_REQUEST['game_type'])) { diff --git a/Application/Admin/View/FinancePromote/index.html b/Application/Admin/View/FinancePromote/index.html index a707f787f..6b85f1523 100644 --- a/Application/Admin/View/FinancePromote/index.html +++ b/Application/Admin/View/FinancePromote/index.html @@ -109,6 +109,15 @@ + +
+ +
+