|
|
|
@ -169,20 +169,20 @@ class PromoteCompanyService
|
|
|
|
|
unset($companyInfo['relation']);
|
|
|
|
|
unset($companyInfo['promotes']);
|
|
|
|
|
|
|
|
|
|
$isUpdate = false;
|
|
|
|
|
$isNew = false;
|
|
|
|
|
if($application['company_id'] == 0){
|
|
|
|
|
//新增
|
|
|
|
|
$isNew = true;
|
|
|
|
|
$application['company_id'] = $companyInfo['id'] = M('promote_company', 'tab_')->add($companyInfo);
|
|
|
|
|
}else{
|
|
|
|
|
//编辑
|
|
|
|
|
$isUpdate = true;
|
|
|
|
|
M('promote_company', 'tab_')->save($companyInfo);
|
|
|
|
|
$this->changePromote($companyInfo);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$this->savePromoteCompanyRelation($bindRelation, $companyInfo);
|
|
|
|
|
$this->savePromotes($promotes, $companyInfo);
|
|
|
|
|
if ($isUpdate && in_array($companyInfo['company_belong'], [1, 2])) {
|
|
|
|
|
if ($isNew && in_array($companyInfo['company_belong'], [1, 2])) {
|
|
|
|
|
$depositService = new PresidentDepositService();
|
|
|
|
|
$depositService->save($deposit, $companyInfo);
|
|
|
|
|
}
|
|
|
|
|