瀏覽代碼

修改获取职场机会列表的接口

15313670163 4 天之前
父節點
當前提交
bc3860a193
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      app/JsonRpc/NewsService.php

+ 3 - 1
app/JsonRpc/NewsService.php

@@ -1652,7 +1652,9 @@ class NewsService implements NewsServiceInterface
         if($user['type_id'] == 1){
             $where['user_id'] = $user['id'];
         }
-        $recruitingId = JobApply::where('user_id', $data['user_id'])
+        $recruitingId = JobApply::when($user['type_id'] == 1, function ($query) use ($user) {
+            $query->where('recruit_id', $user['id']);
+        })
         ->pluck('recruit_id');
         $where = [];
         if(isset($data['salary']) && $data['salary']!=null){