diff --git a/Application/Base/Service/PromoteCompanyService.class.php b/Application/Base/Service/PromoteCompanyService.class.php index 6ab981e6d..6ba0b735a 100644 --- a/Application/Base/Service/PromoteCompanyService.class.php +++ b/Application/Base/Service/PromoteCompanyService.class.php @@ -178,14 +178,14 @@ class PromoteCompanyService $application['company_id'] = $companyInfo['id'] = M('promote_company', 'tab_')->add($companyInfo); }else{ //编辑 - $oldInfo = M('promote_company', 'tab_')->field(['id', 'company_belong'])->where(['id' => $application['company_id']])->find(); + $oldInfo = M('promote_company', 'tab_')->field(['id', 'company_belong', 'develop_type', 'game_ids'])->where(['id' => $application['company_id']])->find(); /** 内团/无 切换为外团 */ if (in_array($companyInfo['company_belong'], [1, 2]) && !in_array($oldInfo['company_belong'], [1, 2])) { $isNewDeposit = true; } M('promote_company', 'tab_')->save($companyInfo); - $this->changePromote($companyInfo); + $this->changePromote($companyInfo, $oldInfo); } $this->savePromoteCompanyRelation($bindRelation, $companyInfo); @@ -236,7 +236,8 @@ class PromoteCompanyService } } - protected function changePromote($companyInfo){ + protected function changePromote($companyInfo, $oldInfo) + { $isChangeBelong = false; $isChangeRelation =false; @@ -245,7 +246,7 @@ class PromoteCompanyService } $companyId = $companyInfo['id']; - $oldInfo = M('promote_company', 'tab_')->field('company_belong,develop_type,game_ids')->where(['id' => $companyId])->find(); + // $oldInfo = M('promote_company', 'tab_')->field('company_belong,develop_type,game_ids')->where(['id' => $companyId])->find(); if(isset($companyInfo['company_belong']) && ($oldInfo['company_belong'] != $companyInfo['company_belong'])){ $isChangeBelong = true;