修复管理公司查询
This commit is contained in:
parent
3a3e5294f2
commit
6f3f36f87b
@ -352,9 +352,9 @@ class CompanyController extends BaseApiController
|
||||
*/
|
||||
public function street_company(){
|
||||
$street=$this->request->param('street_code');
|
||||
$company = Company::where('street', $street)->where('company_type',41)->find();
|
||||
$company=Db::query("select * from la_company where company_type=:company_type and FIND_IN_SET(:street,responsible_area)", ['company_type' => 41,'street'=>$street], true);
|
||||
if($company){
|
||||
return $this->success('ok',['title'=>$company['company_name'],'organization_code'=>$company['organization_code']]);
|
||||
return $this->success('ok',['title'=>$company[0]['company_name'],'organization_code'=>$company[0]['organization_code']]);
|
||||
}else{
|
||||
return $this->fail('没有镇管理公司');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user