数据权限导出修改

master
zhengyongxing 5 years ago
parent 47f53a4941
commit 48437d25c2

@ -40,10 +40,15 @@ class BehaviorLogController extends ThinkController
$endTime = strtotime($endDate) + 86399; $endTime = strtotime($endDate) + 86399;
$map['create_time'] = array('BETWEEN', [$startTime, $endTime]); $map['create_time'] = array('BETWEEN', [$startTime, $endTime]);
$promoteRoot = getPowerPromoteIds(); // $promoteRoot = getPowerPromoteIds();
if ($promoteRoot) { // $data_empower_type = session('user_auth')['data_empower_type'];
$map['promote_id'] =array('in',$promoteRoot); //
} // 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'])) { if (isset($params['promote_id'])) {
$promoteId = $params['promote_id']; $promoteId = $params['promote_id'];

@ -33,10 +33,20 @@ class BindRechargeRecordController extends ThinkController{
$map['create_time'] = ["LT",(strtotime(I("time_end"))+86400-1)]; $map['create_time'] = ["LT",(strtotime(I("time_end"))+86400-1)];
} }
$promoteRoot = getPowerPromoteIds(); // $promoteRoot = getPowerPromoteIds();
if ($promoteRoot) { // if ($promoteRoot) {
$map['promote_id'] =array('in',$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',''); empty(I('pay_order_number')) || $map['pay_order_number'] = I('pay_order_number','');
$data = $model->getLists($map,"create_time desc",$p); $data = $model->getLists($map,"create_time desc",$p);

@ -24,10 +24,15 @@ class DepositController extends ThinkController {
unset($_REQUEST['pay_ip']); unset($_REQUEST['pay_ip']);
} }
$promoteRoot = getPowerPromoteIds(); // $promoteRoot = getPowerPromoteIds();
if ($promoteRoot) { // $data_empower_type = session('user_auth')['data_empower_type'];
$map['promote_id'] =array('in',$promoteRoot); //
} // 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(!isset($_REQUEST['promote_id'])){

@ -90,10 +90,15 @@ class ExportController extends Controller
unset($_REQUEST['role_name']); unset($_REQUEST['role_name']);
} }
$promoteRoot = getPowerPromoteIds(); // $promoteRoot = getPowerPromoteIds();
if ($promoteRoot) { // $data_empower_type = session('user_auth')['data_empower_type'];
$map['promote_id'] =array('in',$promoteRoot); //
} // 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 (isset($_REQUEST['promote_id'])) {
$queryStr = ''; $queryStr = '';
@ -402,10 +407,20 @@ class ExportController extends Controller
} }
$hav = ''; $hav = '';
// $promoteRoot = getPowerPromoteIds();
// if ($promoteRoot) {
// $map['tab_user.promote_id'] =array('in',$promoteRoot);
// }
$promoteRoot = getPowerPromoteIds(); $promoteRoot = getPowerPromoteIds();
if ($promoteRoot) { // $data_empower_type = session('user_auth')['data_empower_type'];
$map['tab_user.promote_id'] =array('in',$promoteRoot); //
} // 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'] != '') {
if($_REQUEST['promote_id']=='UC'){ if($_REQUEST['promote_id']=='UC'){
@ -1070,10 +1085,15 @@ class ExportController extends Controller
unset($_REQUEST['pay_game_status']); unset($_REQUEST['pay_game_status']);
} }
$promoteRoot = getPowerPromoteIds(); // $promoteRoot = getPowerPromoteIds();
if ($promoteRoot) { // $data_empower_type = session('user_auth')['data_empower_type'];
$map['promote_id'] =array('in',$promoteRoot); //
} // 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(isset($_REQUEST['promote_id'])) {
if ($_REQUEST['promote_id'] == 0) { if ($_REQUEST['promote_id'] == 0) {
@ -1180,10 +1200,15 @@ class ExportController extends Controller
unset($_REQUEST['pay_ip']); unset($_REQUEST['pay_ip']);
} }
$promoteRoot = getPowerPromoteIds(); // $promoteRoot = getPowerPromoteIds();
if ($promoteRoot) { // $data_empower_type = session('user_auth')['data_empower_type'];
$map['promote_id'] =array('in',$promoteRoot); //
} // 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 (!isset($_REQUEST['promote_id'])) {
@ -1884,8 +1909,12 @@ class ExportController extends Controller
$map['create_time'] = array('BETWEEN', [$startTime, $endTime]); $map['create_time'] = array('BETWEEN', [$startTime, $endTime]);
$promoteRoot = getPowerPromoteIds(); $promoteRoot = getPowerPromoteIds();
$data_empower_type = session('user_auth')['data_empower_type'];
if ($promoteRoot) { if ($promoteRoot) {
$map['promote_id'] =array('in',$promoteRoot); $map['promote_id'] =array('in',$promoteRoot);
} else if(!$promoteRoot&&$data_empower_type!=1){
$map['id'] = array('lt',1);
} }
if ($promoteId = I('promote_id')) { if ($promoteId = I('promote_id')) {
@ -2921,10 +2950,20 @@ class ExportController extends Controller
empty(I("account")) || $map['user_account'] = ["like","%".I("account")."%"]; 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]]; 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(); // $promoteRoot = getPowerPromoteIds();
if ($promoteRoot) { // if ($promoteRoot) {
$map['promote_id'] =array('in',$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); $data = $model->getLists($map,"create_time desc",$p);
@ -3853,10 +3892,15 @@ if ($key == 'model'){
$map['user_account'] = array('like', '%' . trim($_REQUEST['account']) . '%'); $map['user_account'] = array('like', '%' . trim($_REQUEST['account']) . '%');
} }
$promoteRoot = getPowerPromoteIds(); // $promoteRoot = getPowerPromoteIds();
if ($promoteRoot) { // $data_empower_type = session('user_auth')['data_empower_type'];
$map['promote_id'] =array('in',$promoteRoot); //
} // 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 (isset($_REQUEST['promote_id'])) {
$map['promote_id'] = $_REQUEST['promote_id']; $map['promote_id'] = $_REQUEST['promote_id'];
@ -4213,10 +4257,15 @@ if ($key == 'model'){
array('op_account','发放人员'), array('op_account','发放人员'),
); );
$promoteRoot = getPowerPromoteIds(); // $promoteRoot = getPowerPromoteIds();
if ($promoteRoot) { // $data_empower_type = session('user_auth')['data_empower_type'];
$map['promote_id'] =array('in',$promoteRoot); //
} // 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'])){ if(empty($_REQUEST['promote_id']&&$_REQUEST['promote_type'])){
$map['type'] = 1; $map['type'] = 1;
@ -4288,10 +4337,16 @@ if ($key == 'model'){
$map['source_id'] = 0; $map['source_id'] = 0;
$extend['op_id'] = session('user_auth')['uid']; $extend['op_id'] = session('user_auth')['uid'];
$promoteRoot = getPowerPromoteIds(); // $promoteRoot = getPowerPromoteIds();
if ($promoteRoot) { // $data_empower_type = session('user_auth')['data_empower_type'];
$map['promote_id'] =array('in',$promoteRoot); //
} // 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(isset($_REQUEST['promote_id'])) {
$map['promote_id'] = $_REQUEST['promote_id']; $map['promote_id'] = $_REQUEST['promote_id'];
} }

@ -88,11 +88,16 @@ class MemberController extends ThinkController
$game_map = " and tab_user_play_info.server_name = '{$_REQUEST['server_name']}' "; $game_map = " and tab_user_play_info.server_name = '{$_REQUEST['server_name']}' ";
} }
$promoteRoot = getPowerPromoteIds(); $promoteRoot = getPowerPromoteIds();
if ($promoteRoot) { // $data_empower_type = session('user_auth')['data_empower_type'];
$map['tab_user.promote_id'] =array('in',$promoteRoot); //// var_dump($promoteRoot);die();
} else { //
$map['tab_user.id'] = array('lt',1); // 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 与推广员相关 //1.3 与推广员相关
$promoterSelect = false; $promoterSelect = false;
if ($_REQUEST['promote_id'] != '') { if ($_REQUEST['promote_id'] != '') {
@ -190,7 +195,6 @@ class MemberController extends ThinkController
} }
//如果存在推广员只计算所属的推广员充值记录 //如果存在推广员只计算所属的推广员充值记录
if($promoterSelect){ if($promoterSelect){
$maps = $map; $maps = $map;
@ -1027,12 +1031,15 @@ class MemberController extends ThinkController
unset($_REQUEST['server_name']); unset($_REQUEST['server_name']);
} }
$promoteRoot = getPowerPromoteIds(); // $promoteRoot = getPowerPromoteIds();
if ($promoteRoot) { // $data_empower_type = session('user_auth')['data_empower_type'];
$map['promote_id'] =array('in',$promoteRoot); //
} else { // if ($promoteRoot) {
$map['id'] = array('lt',1); // $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 (isset($_REQUEST['promote_id'])) {
$map['promote_id'] = $_REQUEST['promote_id']; $map['promote_id'] = $_REQUEST['promote_id'];

@ -17,10 +17,20 @@ class PromoteCoinController extends ThinkController
public function send_lists($p = 0) public function send_lists($p = 0)
{ {
$promoteRoot = getPowerPromoteIds(); // $promoteRoot = getPowerPromoteIds();
if ($promoteRoot) { // if ($promoteRoot) {
$extend['promote_id'] =array('in',$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'])) { if (empty($_GET['promote_id'] && $_GET['promote_type'])) {
$extend['type'] = 1; $extend['type'] = 1;
@ -67,10 +77,21 @@ class PromoteCoinController extends ThinkController
} }
$extend['op_id'] = session('user_auth')['uid']; $extend['op_id'] = session('user_auth')['uid'];
$promoteRoot = getPowerPromoteIds(); // $promoteRoot = getPowerPromoteIds();
if ($promoteRoot) { // if ($promoteRoot) {
$map['promote_id'] =array('in',$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); $map['create_time'] = total(1, false);
$sum['to_day'] = D(self::model_name)->where($map)->sum('num'); $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']; $map['order_status'] = $_REQUEST['order_status'];
unset($_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); $data = D("CoinPayOrder")->lists($_GET["p"], $map, $order);
// dump($data); // dump($data);
//执行查询 //执行查询

@ -14,12 +14,18 @@ class RechargeSumController extends ThinkController
$key = 0; $key = 0;
$total = ['current' => 0, 'sum' => 0]; $total = ['current' => 0, 'sum' => 0];
$promoteRoot = getPowerPromoteIds(); // $promoteRoot = getPowerPromoteIds();
if ($promoteRoot) { // $data_empower_type = session('user_auth')['data_empower_type'];
//
$rmap['tab_user.promote_id'] = $map['promote_id'] = array('in',$promoteRoot); // 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 (isset($_REQUEST['promote_id'])) {
if ($_REQUEST['promote_id'] > 0) { if ($_REQUEST['promote_id'] > 0) {

@ -72,10 +72,15 @@ class SpendController extends ThinkController
unset($_REQUEST['pay_game_status']); unset($_REQUEST['pay_game_status']);
} }
$promoteRoot = getPowerPromoteIds(); // $promoteRoot = getPowerPromoteIds();
if ($promoteRoot) { // $data_empower_type = session('user_auth')['data_empower_type'];
$map['promote_id'] =array('in',$promoteRoot); //
} // 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 (isset($_REQUEST['promote_id'])) {
$promoteId = intval($_REQUEST['promote_id']); $promoteId = intval($_REQUEST['promote_id']);

@ -632,10 +632,15 @@ class UserController extends AdminController
unset($_REQUEST['role_name']); unset($_REQUEST['role_name']);
} }
$promoteRoot = getPowerPromoteIds(); // $promoteRoot = getPowerPromoteIds();
if ($promoteRoot) { // $data_empower_type = session('user_auth')['data_empower_type'];
$map['promote_id'] =array('in',$promoteRoot); //
} // 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 (isset($_REQUEST['promote_id'])) {
$queryStr = ''; $queryStr = '';

Loading…
Cancel
Save