|
@@ -29,28 +29,36 @@ class InfoRepository extends Repository {
|
|
|
}
|
|
}
|
|
|
/*所在地区*/
|
|
/*所在地区*/
|
|
|
if(isset($search['district']) && ! empty($search['district'])) {
|
|
if(isset($search['district']) && ! empty($search['district'])) {
|
|
|
- $district = str_replace(',','|',$search['district']);
|
|
|
|
|
|
|
+ $district = $search['district'];
|
|
|
|
|
+ if (is_array($district)) $district = join('|',$district) ;
|
|
|
|
|
+
|
|
|
$currentQuery = $currentQuery->where(function ($query) use ($district) {
|
|
$currentQuery = $currentQuery->where(function ($query) use ($district) {
|
|
|
$query->where('district','REGEXP', $district);
|
|
$query->where('district','REGEXP', $district);
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
/*企业类型*/
|
|
/*企业类型*/
|
|
|
if(isset($search['entType']) && ! empty($search['entType'])) {
|
|
if(isset($search['entType']) && ! empty($search['entType'])) {
|
|
|
- $entType = str_replace(',','|',$search['entType']);
|
|
|
|
|
|
|
+ $entType = $search['entType'];
|
|
|
|
|
+ if (is_array($entType)) $entType = join('|',$entType) ;
|
|
|
|
|
+
|
|
|
$currentQuery = $currentQuery->where(function ($query) use ($entType) {
|
|
$currentQuery = $currentQuery->where(function ($query) use ($entType) {
|
|
|
$query->where('entType','REGEXP',$entType);
|
|
$query->where('entType','REGEXP',$entType);
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
/*经营状态*/
|
|
/*经营状态*/
|
|
|
if(isset($search['openStatus']) && ! empty($search['openStatus'])) {
|
|
if(isset($search['openStatus']) && ! empty($search['openStatus'])) {
|
|
|
- $openStatus = str_replace(',','|',$search['openStatus']);
|
|
|
|
|
|
|
+ $openStatus = $search['openStatus'];
|
|
|
|
|
+ if (is_array($openStatus)) $openStatus = join('|',$openStatus) ;
|
|
|
|
|
+
|
|
|
$currentQuery = $currentQuery->where(function ($query) use ($openStatus) {
|
|
$currentQuery = $currentQuery->where(function ($query) use ($openStatus) {
|
|
|
$query->where('openStatus','REGEXP',$openStatus);
|
|
$query->where('openStatus','REGEXP',$openStatus);
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
/*所属行业*/
|
|
/*所属行业*/
|
|
|
if(isset($search['industry']) && ! empty($search['industry'])) {
|
|
if(isset($search['industry']) && ! empty($search['industry'])) {
|
|
|
- $industry= str_replace(',','|',$search['industry']);
|
|
|
|
|
|
|
+ $industry = $search['industry'];
|
|
|
|
|
+ if (is_array($industry)) $industry = join('|',$industry) ;
|
|
|
|
|
+
|
|
|
$currentQuery = $currentQuery->where(function ($query) use ($industry) {
|
|
$currentQuery = $currentQuery->where(function ($query) use ($industry) {
|
|
|
$query->where('industry','REGEXP',$industry);
|
|
$query->where('industry','REGEXP',$industry);
|
|
|
});
|
|
});
|