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