|
@@ -2237,10 +2237,10 @@ private function fetchArticles($catId, $website, $limit, $isImageArticle = false
|
|
|
}
|
|
|
if(isset($data['hy_id']) && !empty($data['hy_id'])){
|
|
|
array_push($recruit_where, ['hy_id',$data['hy_id']]);
|
|
|
- }
|
|
|
- if(isset($data['keyword']) && !empty($data['keyword'])){
|
|
|
- array_push($recruit_where, ['title','like','%'.$data['keyword'].'%']);
|
|
|
- }
|
|
|
+ }
|
|
|
+ if(isset($data['keyword']) && !empty($data['keyword'])){
|
|
|
+ array_push($recruit_where, ['title','like','%'.$data['keyword'].'%']);
|
|
|
+ }
|
|
|
$query = JobRecruiting::where('job_recruiting.status', 1)
|
|
|
->where('job_recruiting.website_id', $data['website_id'])
|
|
|
->where($recruit_where)
|
|
@@ -2284,10 +2284,10 @@ private function fetchArticles($catId, $website, $limit, $isImageArticle = false
|
|
|
$query = JobHunting::where('status', 2)
|
|
|
->where('job_hunting.website_id', $data['website_id'])
|
|
|
->leftJoin('job_position', 'job_hunting.job_name_get', '=', 'job_position.zwid')
|
|
|
- ->where($hunt_where)
|
|
|
- ->when(isset($data['keyword']) &&!empty($data['keyword']), function ($query) use ($data) {
|
|
|
- $query->where('job_position.zwname','like','%'.$data['keyword'].'%');
|
|
|
- })
|
|
|
+ ->where($hunt_where)
|
|
|
+ ->when(isset($data['keyword']) &&!empty($data['keyword']), function ($query) use ($data) {
|
|
|
+ $query->where('job_position.zwname','like','%'.$data['keyword'].'%');
|
|
|
+ })
|
|
|
->when(isset($data['city_id']) &&!empty($data['city_id']), function ($query) use ($data) {
|
|
|
$query->where(function($q) use ($data) {
|
|
|
$q->WhereRaw("JSON_CONTAINS(job_hunting.city_arr_id, '". intval($data['city_id']). "') = 1");
|