From 48437d25c23a8f86c704d72cd5f89feeba2423dd Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Wed, 18 Dec 2019 14:54:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E6=9D=83=E9=99=90=E5=AF=BC?= =?UTF-8?q?=E5=87=BA=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BehaviorLogController.class.php | 13 +- .../BindRechargeRecordController.class.php | 18 ++- .../Controller/DepositController.class.php | 13 +- .../Controller/ExportController.class.php | 117 +++++++++++++----- .../Controller/MemberController.class.php | 33 +++-- .../PromoteCoinController.class.php | 48 +++++-- .../RechargeSumController.class.php | 18 ++- .../Controller/SpendController.class.php | 13 +- .../Admin/Controller/UserController.class.php | 13 +- 9 files changed, 208 insertions(+), 78 deletions(-) diff --git a/Application/Admin/Controller/BehaviorLogController.class.php b/Application/Admin/Controller/BehaviorLogController.class.php index ffbd3e300..c9cf73d13 100644 --- a/Application/Admin/Controller/BehaviorLogController.class.php +++ b/Application/Admin/Controller/BehaviorLogController.class.php @@ -40,10 +40,15 @@ class BehaviorLogController extends ThinkController $endTime = strtotime($endDate) + 86399; $map['create_time'] = array('BETWEEN', [$startTime, $endTime]); - $promoteRoot = getPowerPromoteIds(); - if ($promoteRoot) { - $map['promote_id'] =array('in',$promoteRoot); - } +// $promoteRoot = getPowerPromoteIds(); +// $data_empower_type = session('user_auth')['data_empower_type']; +// +// if ($promoteRoot) { +// $map['promote_id'] =array('in',$promoteRoot); +// } else if(!$promoteRoot&&$data_empower_type!=1){ +// $map['id'] = array('lt',1); +// } + setPowerPromoteIds($map,'promote_id'); if (isset($params['promote_id'])) { $promoteId = $params['promote_id']; diff --git a/Application/Admin/Controller/BindRechargeRecordController.class.php b/Application/Admin/Controller/BindRechargeRecordController.class.php index 846e8e8e4..c51dcd04b 100644 --- a/Application/Admin/Controller/BindRechargeRecordController.class.php +++ b/Application/Admin/Controller/BindRechargeRecordController.class.php @@ -33,10 +33,20 @@ class BindRechargeRecordController extends ThinkController{ $map['create_time'] = ["LT",(strtotime(I("time_end"))+86400-1)]; } - $promoteRoot = getPowerPromoteIds(); - if ($promoteRoot) { - $map['promote_id'] =array('in',$promoteRoot); - } +// $promoteRoot = getPowerPromoteIds(); +// if ($promoteRoot) { +// $map['promote_id'] =array('in',$promoteRoot); +// } + +// $promoteRoot = getPowerPromoteIds(); +// $data_empower_type = session('user_auth')['data_empower_type']; +// +// if ($promoteRoot) { +// $map['promote_id'] =array('in',$promoteRoot); +// } else if(!$promoteRoot&&$data_empower_type!=1){ +// $map['id'] = array('lt',1); +// } + setPowerPromoteIds($map,'promote_id'); empty(I('pay_order_number')) || $map['pay_order_number'] = I('pay_order_number',''); $data = $model->getLists($map,"create_time desc",$p); diff --git a/Application/Admin/Controller/DepositController.class.php b/Application/Admin/Controller/DepositController.class.php index 43c6016f9..6378c79a0 100644 --- a/Application/Admin/Controller/DepositController.class.php +++ b/Application/Admin/Controller/DepositController.class.php @@ -24,10 +24,15 @@ class DepositController extends ThinkController { unset($_REQUEST['pay_ip']); } - $promoteRoot = getPowerPromoteIds(); - if ($promoteRoot) { - $map['promote_id'] =array('in',$promoteRoot); - } +// $promoteRoot = getPowerPromoteIds(); +// $data_empower_type = session('user_auth')['data_empower_type']; +// +// if ($promoteRoot) { +// $map['promote_id'] =array('in',$promoteRoot); +// } else if(!$promoteRoot&&$data_empower_type!=1){ +// $map['id'] = array('lt',1); +// } + setPowerPromoteIds($map,'promote_id'); if(!isset($_REQUEST['promote_id'])){ diff --git a/Application/Admin/Controller/ExportController.class.php b/Application/Admin/Controller/ExportController.class.php index 1b91e0c76..8eac3a09c 100644 --- a/Application/Admin/Controller/ExportController.class.php +++ b/Application/Admin/Controller/ExportController.class.php @@ -90,10 +90,15 @@ class ExportController extends Controller unset($_REQUEST['role_name']); } - $promoteRoot = getPowerPromoteIds(); - if ($promoteRoot) { - $map['promote_id'] =array('in',$promoteRoot); - } +// $promoteRoot = getPowerPromoteIds(); +// $data_empower_type = session('user_auth')['data_empower_type']; +// +// if ($promoteRoot) { +// $map['promote_id'] =array('in',$promoteRoot); +// } else if(!$promoteRoot&&$data_empower_type!=1){ +// $map['id'] = array('lt',1); +// } + setPowerPromoteIds($map,'promote_id'); if (isset($_REQUEST['promote_id'])) { $queryStr = ''; @@ -402,10 +407,20 @@ class ExportController extends Controller } $hav = ''; +// $promoteRoot = getPowerPromoteIds(); +// if ($promoteRoot) { +// $map['tab_user.promote_id'] =array('in',$promoteRoot); +// } + $promoteRoot = getPowerPromoteIds(); - if ($promoteRoot) { - $map['tab_user.promote_id'] =array('in',$promoteRoot); - } +// $data_empower_type = session('user_auth')['data_empower_type']; +// +// if ($promoteRoot) { +// $map['tab_user.promote_id'] =array('in',$promoteRoot); +// } else if(!$promoteRoot&&$data_empower_type!=1){ +// $map['tab_user.id'] = array('lt',1); +// } + setPowerPromoteIds($map,'tab_user.promote_id'); if ($_REQUEST['promote_id'] != '') { if($_REQUEST['promote_id']=='UC'){ @@ -1070,10 +1085,15 @@ class ExportController extends Controller unset($_REQUEST['pay_game_status']); } - $promoteRoot = getPowerPromoteIds(); - if ($promoteRoot) { - $map['promote_id'] =array('in',$promoteRoot); - } +// $promoteRoot = getPowerPromoteIds(); +// $data_empower_type = session('user_auth')['data_empower_type']; +// +// if ($promoteRoot) { +// $map['promote_id'] =array('in',$promoteRoot); +// } else if(!$promoteRoot&&$data_empower_type!=1){ +// $map['id'] = array('lt',1); +// } + setPowerPromoteIds($map,'promote_id'); if(isset($_REQUEST['promote_id'])) { if ($_REQUEST['promote_id'] == 0) { @@ -1180,10 +1200,15 @@ class ExportController extends Controller unset($_REQUEST['pay_ip']); } - $promoteRoot = getPowerPromoteIds(); - if ($promoteRoot) { - $map['promote_id'] =array('in',$promoteRoot); - } +// $promoteRoot = getPowerPromoteIds(); +// $data_empower_type = session('user_auth')['data_empower_type']; +// +// if ($promoteRoot) { +// $map['promote_id'] =array('in',$promoteRoot); +// } else if(!$promoteRoot&&$data_empower_type!=1){ +// $map['id'] = array('lt',1); +// } + setPowerPromoteIds($map,'promote_id'); if (!isset($_REQUEST['promote_id'])) { @@ -1884,8 +1909,12 @@ class ExportController extends Controller $map['create_time'] = array('BETWEEN', [$startTime, $endTime]); $promoteRoot = getPowerPromoteIds(); + $data_empower_type = session('user_auth')['data_empower_type']; + if ($promoteRoot) { $map['promote_id'] =array('in',$promoteRoot); + } else if(!$promoteRoot&&$data_empower_type!=1){ + $map['id'] = array('lt',1); } if ($promoteId = I('promote_id')) { @@ -2921,10 +2950,20 @@ class ExportController extends Controller empty(I("account")) || $map['user_account'] = ["like","%".I("account")."%"]; empty(I("time_start")) || $map['create_time'] = ["between",[strtotime(I("time_start")),empty(I("time_end"))?time():strtotime(I("time_end"))+86400-1]]; - $promoteRoot = getPowerPromoteIds(); - if ($promoteRoot) { - $map['promote_id'] =array('in',$promoteRoot); - } +// $promoteRoot = getPowerPromoteIds(); +// if ($promoteRoot) { +// $map['promote_id'] =array('in',$promoteRoot); +// } + +// $promoteRoot = getPowerPromoteIds(); +// $data_empower_type = session('user_auth')['data_empower_type']; +// +// if ($promoteRoot) { +// $map['promote_id'] =array('in',$promoteRoot); +// } else if(!$promoteRoot&&$data_empower_type!=1){ +// $map['id'] = array('lt',1); +// } + setPowerPromoteIds($map,'promote_id'); $data = $model->getLists($map,"create_time desc",$p); @@ -3853,10 +3892,15 @@ if ($key == 'model'){ $map['user_account'] = array('like', '%' . trim($_REQUEST['account']) . '%'); } - $promoteRoot = getPowerPromoteIds(); - if ($promoteRoot) { - $map['promote_id'] =array('in',$promoteRoot); - } +// $promoteRoot = getPowerPromoteIds(); +// $data_empower_type = session('user_auth')['data_empower_type']; +// +// if ($promoteRoot) { +// $map['promote_id'] =array('in',$promoteRoot); +// } else if(!$promoteRoot&&$data_empower_type!=1){ +// $map['id'] = array('lt',1); +// } + setPowerPromoteIds($map,'promote_id'); if (isset($_REQUEST['promote_id'])) { $map['promote_id'] = $_REQUEST['promote_id']; @@ -4213,10 +4257,15 @@ if ($key == 'model'){ array('op_account','发放人员'), ); - $promoteRoot = getPowerPromoteIds(); - if ($promoteRoot) { - $map['promote_id'] =array('in',$promoteRoot); - } +// $promoteRoot = getPowerPromoteIds(); +// $data_empower_type = session('user_auth')['data_empower_type']; +// +// if ($promoteRoot) { +// $map['promote_id'] =array('in',$promoteRoot); +// } else if(!$promoteRoot&&$data_empower_type!=1){ +// $map['id'] = array('lt',1); +// } + setPowerPromoteIds($extend,'promote_id'); if(empty($_REQUEST['promote_id']&&$_REQUEST['promote_type'])){ $map['type'] = 1; @@ -4288,10 +4337,16 @@ if ($key == 'model'){ $map['source_id'] = 0; $extend['op_id'] = session('user_auth')['uid']; - $promoteRoot = getPowerPromoteIds(); - if ($promoteRoot) { - $map['promote_id'] =array('in',$promoteRoot); - } +// $promoteRoot = getPowerPromoteIds(); +// $data_empower_type = session('user_auth')['data_empower_type']; +// +// if ($promoteRoot) { +// $map['promote_id'] =array('in',$promoteRoot); +// } else if(!$promoteRoot&&$data_empower_type!=1){ +// $map['id'] = array('lt',1); +// } + setPowerPromoteIds($map,'promote_id'); + if(isset($_REQUEST['promote_id'])) { $map['promote_id'] = $_REQUEST['promote_id']; } diff --git a/Application/Admin/Controller/MemberController.class.php b/Application/Admin/Controller/MemberController.class.php index c5ec3c68c..8f71e70a2 100644 --- a/Application/Admin/Controller/MemberController.class.php +++ b/Application/Admin/Controller/MemberController.class.php @@ -88,11 +88,16 @@ class MemberController extends ThinkController $game_map = " and tab_user_play_info.server_name = '{$_REQUEST['server_name']}' "; } $promoteRoot = getPowerPromoteIds(); - if ($promoteRoot) { - $map['tab_user.promote_id'] =array('in',$promoteRoot); - } else { - $map['tab_user.id'] = array('lt',1); - } +// $data_empower_type = session('user_auth')['data_empower_type']; +//// var_dump($promoteRoot);die(); +// +// if ($promoteRoot) { +// $map['tab_user.promote_id'] =array('in',$promoteRoot); +// } else if(!$promoteRoot&&$data_empower_type!=1){ +// $map['tab_user.id'] = array('lt',1); +// } + setPowerPromoteIds($map,'tab_user.promote_id'); + //1.3 与推广员相关 $promoterSelect = false; if ($_REQUEST['promote_id'] != '') { @@ -188,8 +193,7 @@ class MemberController extends ThinkController // dump($now_count->select(false));die(); $now_count = $now_count->find()['recharge_total']; } - - + //如果存在推广员只计算所属的推广员充值记录 if($promoterSelect){ @@ -1027,12 +1031,15 @@ class MemberController extends ThinkController unset($_REQUEST['server_name']); } - $promoteRoot = getPowerPromoteIds(); - if ($promoteRoot) { - $map['promote_id'] =array('in',$promoteRoot); - } else { - $map['id'] = array('lt',1); - } +// $promoteRoot = getPowerPromoteIds(); +// $data_empower_type = session('user_auth')['data_empower_type']; +// +// if ($promoteRoot) { +// $map['promote_id'] =array('in',$promoteRoot); +// } else if(!$promoteRoot&&$data_empower_type!=1){ +// $map['id'] = array('lt',1); +// } + setPowerPromoteIds($map,'promote_id'); if (isset($_REQUEST['promote_id'])) { $map['promote_id'] = $_REQUEST['promote_id']; diff --git a/Application/Admin/Controller/PromoteCoinController.class.php b/Application/Admin/Controller/PromoteCoinController.class.php index 35da72ca0..08559cb26 100644 --- a/Application/Admin/Controller/PromoteCoinController.class.php +++ b/Application/Admin/Controller/PromoteCoinController.class.php @@ -17,10 +17,20 @@ class PromoteCoinController extends ThinkController public function send_lists($p = 0) { - $promoteRoot = getPowerPromoteIds(); - if ($promoteRoot) { - $extend['promote_id'] =array('in',$promoteRoot); - } +// $promoteRoot = getPowerPromoteIds(); +// if ($promoteRoot) { +// $extend['promote_id'] =array('in',$promoteRoot); +// } + +// $promoteRoot = getPowerPromoteIds(); +// $data_empower_type = session('user_auth')['data_empower_type']; +// +// if ($promoteRoot) { +// $extend['promote_id'] =array('in',$promoteRoot); +// } else if(!$promoteRoot&&$data_empower_type!=1){ +// $extend['id'] = array('lt',1); +// } + setPowerPromoteIds($extend,'promote_id'); if (empty($_GET['promote_id'] && $_GET['promote_type'])) { $extend['type'] = 1; @@ -67,10 +77,21 @@ class PromoteCoinController extends ThinkController } $extend['op_id'] = session('user_auth')['uid']; - $promoteRoot = getPowerPromoteIds(); - if ($promoteRoot) { - $map['promote_id'] =array('in',$promoteRoot); - } +// $promoteRoot = getPowerPromoteIds(); +// if ($promoteRoot) { +// $map['promote_id'] =array('in',$promoteRoot); +// } + +// $promoteRoot = getPowerPromoteIds(); +// $data_empower_type = session('user_auth')['data_empower_type']; +// +// if ($promoteRoot) { +// $map['promote_id'] =array('in',$promoteRoot); +// } else if(!$promoteRoot&&$data_empower_type!=1){ +// $map['id'] = array('lt',1); +// } + setPowerPromoteIds($map,'promote_id'); + $map['create_time'] = total(1, false); $sum['to_day'] = D(self::model_name)->where($map)->sum('num'); @@ -267,6 +288,17 @@ class PromoteCoinController extends ThinkController $map['order_status'] = $_REQUEST['order_status']; unset($_REQUEST['order_status']); } + +// $promoteRoot = getPowerPromoteIds(); +// $data_empower_type = session('user_auth')['data_empower_type']; +// +// if ($promoteRoot) { +// $map['promote_id'] =array('in',$promoteRoot); +// } else if(!$promoteRoot&&$data_empower_type!=1){ +// $map['id'] = array('lt',1); +// } + setPowerPromoteIds($map,'promote_id'); + $data = D("CoinPayOrder")->lists($_GET["p"], $map, $order); // dump($data); //执行查询 diff --git a/Application/Admin/Controller/RechargeSumController.class.php b/Application/Admin/Controller/RechargeSumController.class.php index ef2693510..9cbf9358e 100644 --- a/Application/Admin/Controller/RechargeSumController.class.php +++ b/Application/Admin/Controller/RechargeSumController.class.php @@ -14,12 +14,18 @@ class RechargeSumController extends ThinkController $key = 0; $total = ['current' => 0, 'sum' => 0]; - $promoteRoot = getPowerPromoteIds(); - if ($promoteRoot) { - - $rmap['tab_user.promote_id'] = $map['promote_id'] = array('in',$promoteRoot); - } - +// $promoteRoot = getPowerPromoteIds(); +// $data_empower_type = session('user_auth')['data_empower_type']; +// +// if ($promoteRoot) { +// +// $rmap['tab_user.promote_id'] = $map['promote_id'] = array('in',$promoteRoot); +// } else if (!$promoteRoot&&$data_empower_type!=1) { +// $rmap['tab_user.id'] = $map['id'] = array('lt',1); +// } + + setPowerPromoteIds($map,'promote_id'); + setPowerPromoteIds($rmap,'tab_user.promote_id'); if (isset($_REQUEST['promote_id'])) { if ($_REQUEST['promote_id'] > 0) { diff --git a/Application/Admin/Controller/SpendController.class.php b/Application/Admin/Controller/SpendController.class.php index dae03f3fb..e7f11debd 100644 --- a/Application/Admin/Controller/SpendController.class.php +++ b/Application/Admin/Controller/SpendController.class.php @@ -72,10 +72,15 @@ class SpendController extends ThinkController unset($_REQUEST['pay_game_status']); } - $promoteRoot = getPowerPromoteIds(); - if ($promoteRoot) { - $map['promote_id'] =array('in',$promoteRoot); - } +// $promoteRoot = getPowerPromoteIds(); +// $data_empower_type = session('user_auth')['data_empower_type']; +// +// if ($promoteRoot) { +// $map['promote_id'] =array('in',$promoteRoot); +// } else if(!$promoteRoot&&$data_empower_type!=1){ +// $map['id'] = array('lt',1); +// } + setPowerPromoteIds($map,'promote_id'); if (isset($_REQUEST['promote_id'])) { $promoteId = intval($_REQUEST['promote_id']); diff --git a/Application/Admin/Controller/UserController.class.php b/Application/Admin/Controller/UserController.class.php index a14988b39..a71288f9d 100644 --- a/Application/Admin/Controller/UserController.class.php +++ b/Application/Admin/Controller/UserController.class.php @@ -632,10 +632,15 @@ class UserController extends AdminController unset($_REQUEST['role_name']); } - $promoteRoot = getPowerPromoteIds(); - if ($promoteRoot) { - $map['promote_id'] =array('in',$promoteRoot); - } +// $promoteRoot = getPowerPromoteIds(); +// $data_empower_type = session('user_auth')['data_empower_type']; +// +// if ($promoteRoot) { +// $map['promote_id'] =array('in',$promoteRoot); +// } else if(!$promoteRoot&&$data_empower_type!=1){ +// $map['id'] = array('lt',1); +// } + setPowerPromoteIds($map,'promote_id'); if (isset($_REQUEST['promote_id'])) { $queryStr = '';