From bbc1f6b89a620421ecb4ae9c1d3b8373d80f0e10 Mon Sep 17 00:00:00 2001 From: yulingwei <2436953959@qq.com> Date: Mon, 20 Apr 2020 18:06:07 +0800 Subject: [PATCH] upt --- Application/Base/Service/PromoteService.class.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Application/Base/Service/PromoteService.class.php b/Application/Base/Service/PromoteService.class.php index 83b814d4e..a048db92d 100644 --- a/Application/Base/Service/PromoteService.class.php +++ b/Application/Base/Service/PromoteService.class.php @@ -971,8 +971,16 @@ class PromoteService { $data['chain'] = '/'; $data['level'] = 1; } + $insert = M('promote', 'tab_')->add($data); - return M('promote', 'tab_')->add($data); + // 如果是外团的,则自动加入市场总监审核列表 + if ($data['level'] == 1 && in_array($data['company_belong'], [1, 2])) { + $id = M('promote', 'tab_')->getLastInsID(); + $info = M('sys_auth_group')->where(['title'=>'市场总监'])->find(); + M('sys_auth_group')->where(['title'=>'市场总监'])->save(['data_president'=>$info['data_president'].",".$id]); + } + + return $insert; } public function getLandingPageIdentifier($url)