|
@@ -1857,6 +1857,12 @@ class NewsService implements NewsServiceInterface
|
|
|
|
|
|
$where[] = ['user.user_name', 'like', '%' . $data['username'] . '%'];
|
|
|
}
|
|
|
+ //status 1待审核2已审核3已拒绝
|
|
|
+ if (isset($data['status']) && $data['status'] != '') {
|
|
|
+ $where = [
|
|
|
+ 'job_hunting.status' => $data['status'],
|
|
|
+ ];
|
|
|
+ }
|
|
|
$type_id = isset($data['type_id']) ? $data['type_id'] : '';
|
|
|
$user_id = isset($data['user_id']) ? $data['user_id'] : '';
|
|
|
unset($data['type_id']);
|
|
@@ -1864,6 +1870,10 @@ class NewsService implements NewsServiceInterface
|
|
|
$where[] = ['job_hunting.user_id', '=', $user_id];
|
|
|
}
|
|
|
$result = JobHunting::where($where)
|
|
|
+ ->when(!empty($data['status1']), function ($query) use ($data) {
|
|
|
+ return $query->whereIn('job_hunting.status', [1, 3]); //1待审核2已审核3已拒绝
|
|
|
+ })
|
|
|
+
|
|
|
->leftJoin('user', 'user.id', '=', 'job_hunting.user_id')
|
|
|
->leftJoin('website', 'website.id', '=', 'job_hunting.website_id')
|
|
|
->select('job_hunting.*', 'user.nickname as nickname', 'user.user_name as username', 'website.website_name as website_name')
|