diff --git a/Application/Admin/Controller/AggregateRelationController.class.php b/Application/Admin/Controller/AggregateRelationController.class.php index 01464363e..8d0346fd7 100644 --- a/Application/Admin/Controller/AggregateRelationController.class.php +++ b/Application/Admin/Controller/AggregateRelationController.class.php @@ -678,7 +678,8 @@ class AggregateRelationController extends AdminController * @return void */ protected function getBindCompanyId($type){ - $dbres = M("CompanyRelation","tab_")->where("first_company_type = {$type} OR second_company_type = {$type}")->field("first_company_id,second_company_id")->select(); + $dbres = M("CompanyRelation","tab_")->where("first_company_type = {$type} OR second_company_type = {$type}")->field("first_company_id,second_company_id,first_company_type,second_company_type")->select(); + if(empty($dbres)){ return false; }else{ @@ -690,6 +691,7 @@ class AggregateRelationController extends AdminController $sendid[] = $v['second_company_id']; } } + return implode(",",$sendid); } }