|
|
@ -258,8 +258,8 @@ class PromoteCompanyService
|
|
|
|
if($isChangeBelong || $isChangeRelation ) {
|
|
|
|
if($isChangeBelong || $isChangeRelation ) {
|
|
|
|
|
|
|
|
|
|
|
|
$data = array(
|
|
|
|
$data = array(
|
|
|
|
'company_belong' => $save['company_belong'],
|
|
|
|
'company_belong' => $companyInfo['company_belong'],
|
|
|
|
'company_relation' => $save['develop_type']
|
|
|
|
'company_relation' => $companyInfo['develop_type']
|
|
|
|
);
|
|
|
|
);
|
|
|
|
M('promote', 'tab_')->where(['company_id' => $companyId])->save($data);
|
|
|
|
M('promote', 'tab_')->where(['company_id' => $companyId])->save($data);
|
|
|
|
|
|
|
|
|
|
|
@ -268,7 +268,7 @@ class PromoteCompanyService
|
|
|
|
$authGroup = M('auth_group', 'sys_')->where(['title'=>'市场总监'])->find();
|
|
|
|
$authGroup = M('auth_group', 'sys_')->where(['title'=>'市场总监'])->find();
|
|
|
|
$subPromoteIds = M('promote', 'tab_')->where(['level' => 1, 'company_id' => $companyId])->getField('id', true);
|
|
|
|
$subPromoteIds = M('promote', 'tab_')->where(['level' => 1, 'company_id' => $companyId])->getField('id', true);
|
|
|
|
$dataPresident = explode(',', $authGroup['data_president']);
|
|
|
|
$dataPresident = explode(',', $authGroup['data_president']);
|
|
|
|
if ($save['company_belong'] == 1 || $save['company_belong'] == 2) {
|
|
|
|
if ($companyInfo['company_belong'] == 1 || $companyInfo['company_belong'] == 2) {
|
|
|
|
$dataPresident = array_unique(array_merge($dataPresident, $subPromoteIds));
|
|
|
|
$dataPresident = array_unique(array_merge($dataPresident, $subPromoteIds));
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
$dataPresident = array_diff($dataPresident, $subPromoteIds);
|
|
|
|
$dataPresident = array_diff($dataPresident, $subPromoteIds);
|
|
|
|