diff --git a/Application/Base/Service/PromoteCompanyService.class.php b/Application/Base/Service/PromoteCompanyService.class.php index 0082e1dd2..e58d83da3 100644 --- a/Application/Base/Service/PromoteCompanyService.class.php +++ b/Application/Base/Service/PromoteCompanyService.class.php @@ -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); }