|
|
|
@ -346,10 +346,10 @@ class PromoteCompanyController extends ThinkController
|
|
|
|
|
$subPromoteIds = M('promote', 'tab_')->where(['level' => 1, 'company_id' => $company_id])->getField('id', true);
|
|
|
|
|
$dataPresident = explode(',', $authGroup['data_president']);
|
|
|
|
|
M('sys_auth_group')->where(['title'=>'市场总监'])->save(['data_president'=>$info['data_president'].",".$id]);
|
|
|
|
|
if ($save['company_belong'] == 0) {
|
|
|
|
|
$dataPresident = array_diff($dataPresident, $subPromoteIds);
|
|
|
|
|
} elseif ($save['company_belong'] == 1 || $save['company_belong'] == 2) {
|
|
|
|
|
if ($save['company_belong'] == 1 || $save['company_belong'] == 2) {
|
|
|
|
|
$dataPresident = array_unique(array_merge($dataPresident, $subPromoteIds));
|
|
|
|
|
} else {
|
|
|
|
|
$dataPresident = array_diff($dataPresident, $subPromoteIds);
|
|
|
|
|
}
|
|
|
|
|
M('sys_auth_group')->where(['title'=>'市场总监'])->save(['data_president'=>implode(',', $dataPresident)]);
|
|
|
|
|
|
|
|
|
|