diff --git a/Application/Admin/Controller/FinancePromoteController.class.php b/Application/Admin/Controller/FinancePromoteController.class.php index ec695235f..707af6563 100644 --- a/Application/Admin/Controller/FinancePromoteController.class.php +++ b/Application/Admin/Controller/FinancePromoteController.class.php @@ -272,7 +272,7 @@ class FinancePromoteController extends AdminController } $adminIds = getSearchAdminIds(); - + $needSearch = needSearchDepartment(); 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')) ); @@ -285,6 +285,9 @@ class FinancePromoteController extends AdminController } if (is_array($adminIds)) { $map['s.market_admin_id'] = ['in', $adminIds]; + if ($needSearch) { + $map['promote.admin_id'] = ['in', $adminIds]; + } } $map['s.pay_status']=1; $map['s.is_check']=2; @@ -343,7 +346,7 @@ class FinancePromoteController extends AdminController } $adminIds = getSearchAdminIds(); - + $needSearch = needSearchDepartment(); 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')) ); @@ -356,6 +359,9 @@ class FinancePromoteController extends AdminController } if (is_array($adminIds)) { $map['s.market_admin_id'] = ['in', $adminIds]; + if ($needSearch) { + $map['promote.admin_id'] = ['in', $adminIds]; + } } $map['s.pay_status']=1; // $map['s.is_check']=1; @@ -569,6 +575,7 @@ class FinancePromoteController extends AdminController } $adminIds = getSearchAdminIds(); + $needSearch = needSearchDepartment(); 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')) ); @@ -583,6 +590,9 @@ class FinancePromoteController extends AdminController } if (is_array($adminIds)) { $map['s.market_admin_id'] = ['in', $adminIds]; + if ($needSearch) { + $map['promote.admin_id'] = ['in', $adminIds]; + } } $map['s.pay_status']=1; $map['s.is_check']=1; @@ -947,8 +957,12 @@ class FinancePromoteController extends AdminController private function gameStatisticsData($map, $row = 0, $page = 1) { $adminIds = getSearchAdminIds(); + $needSearch = needSearchDepartment(); if (is_array($adminIds)) { $map['s.market_admin_id'] = ['in', $adminIds]; + if ($needSearch) { + $map['promote.admin_id'] = ['in', $adminIds]; + } } $map['s.pay_status']=1; @@ -982,8 +996,12 @@ class FinancePromoteController extends AdminController private function totalGameStatisticsData($map, $join = true) { $adminIds = getSearchAdminIds(); + $needSearch = needSearchDepartment(); if (is_array($adminIds)) { $map['s.market_admin_id'] = ['in', $adminIds]; + if ($needSearch) { + $map['promote.admin_id'] = ['in', $adminIds]; + } } $query = SM("spend","tab_")->alias("s")