diff --git a/app/adminapi/controller/CompanyController.php b/app/adminapi/controller/CompanyController.php index ffb797efe..d8095b13f 100644 --- a/app/adminapi/controller/CompanyController.php +++ b/app/adminapi/controller/CompanyController.php @@ -390,15 +390,15 @@ class CompanyController extends BaseAdminController // 根据street码查询所属镇农科公司 $company_select=Db::query("select * from la_company where company_type=:company_type and FIND_IN_SET(:street,responsible_area)", ['company_type' => 41,'street'=>$params['street']], true); + $company=$company_select[0]; // 市级供应链直接和海之农签约 if (isset($params['type_id']) && $params['type_id'] == 12) { - $company_select = Company::where(['company_name' => '泸州市海之农科技有限公司'])->find(); + $company = Company::where(['company_name' => '泸州市海之农科技有限公司'])->find(); } - - if(empty($company_select)) { + if(empty($company)) { throw new Exception('当前区域无镇农科公司'); } - $company=$company_select[0]; + $data = [ 'mer_intention_id' => $params['mer_intention_id']??'', // 商城商户入驻申请id,签约完成后回调使用 'company_name' => $params['company_name']??'',