From 6095f3b12d34dac574f4f5db10bb08af27bc2783 Mon Sep 17 00:00:00 2001 From: chenzhi Date: Mon, 13 Sep 2021 18:26:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=88=97=E8=A1=A8=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=B8=82=E5=9C=BA=E9=83=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Common/extend.php | 9 ++++++--- .../Controller/MemberController.class.php | 18 +++++++++++++++++- Application/Admin/Event/MarketEvent.class.php | 5 +++++ Application/Admin/View/Member/user_info.html | 12 +++++++++++- 4 files changed, 39 insertions(+), 5 deletions(-) diff --git a/Application/Admin/Common/extend.php b/Application/Admin/Common/extend.php index cb480872d..be718fc64 100644 --- a/Application/Admin/Common/extend.php +++ b/Application/Admin/Common/extend.php @@ -3096,11 +3096,14 @@ function withMarketAdminCondition($map, $searchMarketAdminId = 0) } if ($adminId == 0) { - $adminId = $searchMarketAdminId > 0 ? $searchMarketAdminId : 0; + $adminId = empty($searchMarketAdminId) ? 0 : $searchMarketAdminId; + } + if($adminId == -1){ + $map['promote_id'] = ['in', [$adminId]]; + return $map; } - if ($adminId) { - $topPromoteIds = M('promote', 'tab_')->where(['admin_id' => $adminId, 'level' => 1])->getField('id', true); + $topPromoteIds = M('promote', 'tab_')->where(['admin_id' => ['in',$adminId], 'level' => 1])->getField('id', true); $promoteIds = getPromoteIdsByTopIds($topPromoteIds); if (count($promoteIds) == 0) { $promoteIds = [-1]; diff --git a/Application/Admin/Controller/MemberController.class.php b/Application/Admin/Controller/MemberController.class.php index 02eb09e59..17e292df3 100644 --- a/Application/Admin/Controller/MemberController.class.php +++ b/Application/Admin/Controller/MemberController.class.php @@ -83,7 +83,22 @@ class MemberController extends ThinkController $is_repeat = true; } $isMarketAdmin = isMarketAdmin(); - $map = withMarketAdminCondition($map, I('market_admin_id', 0)); + + $marketAdminIds = 0; + if(!empty($_REQUEST['market_admin_id'])){ + $marketAdminIds = $_REQUEST['market_admin_id']; + } + if(!empty($_REQUEST['department_id'])){ + $departmentUser = A("Market",'Event')->getDepartmentUserId($_REQUEST['department_id']); + if($marketAdminIds){ + if(!in_array($marketAdminIds,$departmentUser)){ + $marketAdminIds = -1; + } + }else{ + $marketAdminIds = $departmentUser; + } + } + $map = withMarketAdminCondition($map, $marketAdminIds); if (isset($_REQUEST['status'])) { $map['lock_status'] = $_REQUEST['status']; @@ -318,6 +333,7 @@ class MemberController extends ThinkController $this->assign('_page', $page); } $this->assign('list_data', $data); + $this->assign('departments', A("Market",'Event')->getDepartments()); $show_data_power = (is_administrator()|| session('user_auth')['show_data']); $this->assign('show_data_power', $show_data_power); $this->display(); diff --git a/Application/Admin/Event/MarketEvent.class.php b/Application/Admin/Event/MarketEvent.class.php index 882907569..5683285fa 100644 --- a/Application/Admin/Event/MarketEvent.class.php +++ b/Application/Admin/Event/MarketEvent.class.php @@ -293,5 +293,10 @@ class MarketEvent extends Controller return $this->marketDepartment[$type]; } + /**获取市场部部门 */ + public function getDepartments() + { + return M('department', 'sys_')->where(['id'=>['in',$this->MarketDepartmentId]])->field("id,name")->select(); + } } \ No newline at end of file diff --git a/Application/Admin/View/Member/user_info.html b/Application/Admin/View/Member/user_info.html index 69223927a..b4a5bbb9b 100644 --- a/Application/Admin/View/Member/user_info.html +++ b/Application/Admin/View/Member/user_info.html @@ -166,6 +166,15 @@ +
+ +
+
+
  @@ -402,7 +412,7 @@ 去重用户数:{$repeat_count}   非去重用户数:{$no_repeat_count}   - + 用户累计充值:仅表示符合筛选条件下的所有用户的充值总额,因为存在换绑等原因,所以不作为推广员充值总额的依据。