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)