From 2c9092273f168b9ef93057a732f6f1a2a2112d19 Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Mon, 31 Aug 2020 15:36:52 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Base/Service/PromoteCompanyService.class.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Application/Base/Service/PromoteCompanyService.class.php b/Application/Base/Service/PromoteCompanyService.class.php index 6ba0b735a..a2acdd9a5 100644 --- a/Application/Base/Service/PromoteCompanyService.class.php +++ b/Application/Base/Service/PromoteCompanyService.class.php @@ -281,12 +281,17 @@ class PromoteCompanyService private function savePromotes($records, $company, $creator) { + $status = 0; + if (C('PROMOTE_AUTO_AUDIT') == 1) { + $status = 1; + } $promoteService = new PromoteService(); foreach ($records as $record) { $promoteService->addPromote([ 'account' => $record['account'], 'password' => $record['password'], 'real_name' => $record['real_name'], + 'status' => $status, 'email' => $record['email'], 'mobile_phone' => $record['mobile_phone'], 'can_view_recharge' => $record['can_view_recharge'], From 050eb98843cfc5ba0d7245e890612a3be6b9b6ab Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Mon, 31 Aug 2020 15:52:40 +0800 Subject: [PATCH 2/3] xiugai --- Application/Base/Service/PromoteCompanyService.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Application/Base/Service/PromoteCompanyService.class.php b/Application/Base/Service/PromoteCompanyService.class.php index a2acdd9a5..66c1c09df 100644 --- a/Application/Base/Service/PromoteCompanyService.class.php +++ b/Application/Base/Service/PromoteCompanyService.class.php @@ -281,10 +281,10 @@ class PromoteCompanyService private function savePromotes($records, $company, $creator) { - $status = 0; - if (C('PROMOTE_AUTO_AUDIT') == 1) { + $status = 1; + /* if (C('PROMOTE_AUTO_AUDIT') == 1) { $status = 1; - } + } */ $promoteService = new PromoteService(); foreach ($records as $record) { $promoteService->addPromote([ From f37f6c51dde272f53b8f1cb3bb6541c45cf5aa6e Mon Sep 17 00:00:00 2001 From: ELF <360197197@qq.com> Date: Mon, 31 Aug 2020 18:56:54 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Controller/UserController.class.php | 9 +++++++++ .../Home/Controller/BaseController.class.php | 13 +++++++++++++ 2 files changed, 22 insertions(+) diff --git a/Application/Admin/Controller/UserController.class.php b/Application/Admin/Controller/UserController.class.php index 48c7c8bfd..dc32cb6f0 100644 --- a/Application/Admin/Controller/UserController.class.php +++ b/Application/Admin/Controller/UserController.class.php @@ -387,6 +387,15 @@ class UserController extends AdminController $this->error('该手机号码已经添加过!'); } } + + $group = M('auth_group', 'sys_')->where(['id' => I('auth')])->find(); + if (is_null($group)) { + $this->error('角色类型不存在!'); + } else { + if (!IS_ROOT && strpos($group['title'], '市场专员') !== false && !isMarketLeader()) { + $this->error('市场专员编辑仅允许市场总监操作!'); + } + } // if (isset($_POST['mobile']) && $_POST['mobile'] != '') { // $dx = A('Phone'); // $res = $dx->check_tel_code($_POST['mobile'], $_POST['code']); diff --git a/Application/Home/Controller/BaseController.class.php b/Application/Home/Controller/BaseController.class.php index d9cec83e2..fa876e441 100644 --- a/Application/Home/Controller/BaseController.class.php +++ b/Application/Home/Controller/BaseController.class.php @@ -391,6 +391,19 @@ class BaseController extends HomeController if ($permission == 'view-user-recharge') { $promoteService = new PromoteService(); $topPromote = $promoteService->getTopPromote($promote); + + /** + * 市场部特殊推广公司的规则 + */ + $onlyPresidentList = [330, 331, 332]; + if (in_array($topPromote['company_id'], $onlyPresidentList)) { + if ($topPromote['can_view_recharge'] == 1 && $promote['level'] == 1) { + return true; + } else { + return false; + } + } + if ($topPromote['can_view_recharge'] == 1) { return true; }