From 96bf040f985cae6c7f6d0605c7e881721ccec040 Mon Sep 17 00:00:00 2001 From: liuweiwen <“529520975@qq.com> Date: Wed, 18 Dec 2019 19:03:17 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=BC=E5=87=BA=E6=95=B0=E6=8D=AE=E6=9D=83?= =?UTF-8?q?=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/ExportController.class.php | 4 ++++ .../Admin/Controller/PromoteController.class.php | 2 ++ .../Admin/Controller/QueryController.class.php | 11 ++++++++--- Application/Admin/Event/SettlementEvent.class.php | 4 +++- Application/Admin/View/Mend/recordList.html | 2 +- 5 files changed, 18 insertions(+), 5 deletions(-) diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 6ecfb747a..4d7d08be7 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -947,6 +947,9 @@ class ExportController extends Controller break; case 5: $map['promote_id'] = array("neq", 0); + if (isset($_REQUEST['promote_id'])) { + $map['_string'] = 'promote_id=' . $_REQUEST['promote_id']; + } if (isset($_REQUEST['user_account'])) { $map['user_account'] = array('like', '%' . $_REQUEST['user_account'] . '%'); unset($_REQUEST['user_account']); @@ -987,6 +990,7 @@ class ExportController extends Controller } //为数据权限添加 setPowerPromoteIds($map); + $map1 = $map; $map1['pay_status'] = 1; $total = M('Agent', 'tab_')->where($map1)->sum('amount'); diff --git a/Application/Admin/Controller/PromoteController.class.php b/Application/Admin/Controller/PromoteController.class.php index 55f5f1330..6877d1e2b 100644 --- a/Application/Admin/Controller/PromoteController.class.php +++ b/Application/Admin/Controller/PromoteController.class.php @@ -668,8 +668,10 @@ class PromoteController extends ThinkController $map['promote_id']=array($map['promote_id'],array('in',implode(',', $all_promote_id)),'and'); } + //为数据权限添加 setPowerPromoteIds($map); +// dd($map); $model = array( 'm_name' => 'Spend', 'map' => $map, diff --git a/Application/Admin/Controller/QueryController.class.php b/Application/Admin/Controller/QueryController.class.php index 6626aa17e..e944c089b 100644 --- a/Application/Admin/Controller/QueryController.class.php +++ b/Application/Admin/Controller/QueryController.class.php @@ -86,12 +86,15 @@ class QueryController extends ThinkController $smap['pay_time'] = array('BETWEEN', array(strtotime($start), strtotime($end) + 24 * 60 * 60 - 1)); $smap['is_check'] = 1; $smap['settle_check'] = 0; + //为数据权限添加 + setPowerPromoteIds($umap, 'tab_user.promote_id'); + setPowerPromoteIds($smap, 'tab_spend.promote_id'); $map['umap'] = $umap; $map['smap'] = $smap; $user = A('Settlement', 'Event'); - //为数据权限添加 - setPowerPromoteIds($map); + + $user->settlement($model, $p, $map); } else { $this->display(); @@ -150,8 +153,9 @@ class QueryController extends ThinkController 'template_list' => 'settlement', ); //为数据权限添加 - setPowerPromoteIds($map1); + setPowerPromoteIds($map); $map1 = $map; + $ztotal = null_to_0(D('settlement')->where($map1)->sum('sum_money*10000') / 10000); $this->assign('ztotal', $ztotal); $ttotal = null_to_0(D('settlement')->where('create_time' . total(1))->sum('sum_money*10000') / 10000); @@ -159,6 +163,7 @@ class QueryController extends ThinkController $ytotal = null_to_0(D('settlement')->where('create_time' . total(5))->sum('sum_money*10000') / 10000); $this->assign('ytotal', $ytotal); $user = A('Bill', 'Event'); + $user->money_list($model, $p, $map); } diff --git a/Application/Admin/Event/SettlementEvent.class.php b/Application/Admin/Event/SettlementEvent.class.php index 83a9272c7..0a29e99a7 100644 --- a/Application/Admin/Event/SettlementEvent.class.php +++ b/Application/Admin/Event/SettlementEvent.class.php @@ -39,7 +39,9 @@ class SettlementEvent extends ThinkEvent { $spend = M('Spend','tab_'); $ssql=$spend - ->field('tab_spend.pay_order_number,tab_spend.game_id,tab_spend.game_name,t.pid as pid,pay_amount,if(isnull(tab_apply.promote_ratio),tab_game.ratio,tab_apply.promote_ratio) as ratio,if(isnull(tab_apply.promote_money),tab_game.money,tab_apply.promote_money) as money') + ->field('tab_spend.pay_order_number,tab_spend.game_id,tab_spend.game_name,t.pid as pid,pay_amount, + if(isnull(tab_apply.promote_ratio),tab_game.ratio,tab_apply.promote_ratio) as ratio, + if(isnull(tab_apply.promote_money),tab_game.money,tab_apply.promote_money) as money') ->join("INNER JOIN ( SELECT tp2.*, tp1.id AS pid, diff --git a/Application/Admin/View/Mend/recordList.html b/Application/Admin/View/Mend/recordList.html index a1894695c..51f932653 100644 --- a/Application/Admin/View/Mend/recordList.html +++ b/Application/Admin/View/Mend/recordList.html @@ -82,7 +82,7 @@