LiuJ 3 days ago
parent
commit
972c94691e
1 changed files with 6 additions and 10 deletions
  1. 6 10
      app/JsonRpc/NewsService.php

+ 6 - 10
app/JsonRpc/NewsService.php

@@ -4356,17 +4356,13 @@ class NewsService implements NewsServiceInterface
     }
     $result = User::where('type_id', 2)
       ->where('status', 1)
-      ->where('id', $data['id'])
-      ->first(['cat_arr_id']);
-    if (empty($article)) {
-      $article = JobHunting::where('website_id', $data['website_id'])
-        ->where('status', 2)
-        ->where('id', $data['id'])
-        ->first(['cat_arr_id']);
-    }
-    if (empty($article)) {
-      return Result::error("该招工招聘不存在", 0);
+      ->where($where)
+      ->leftJoin('user_info', 'user.id', '=', 'user_info.user_id')
+      ->get();
+    if (empty($result)) {
+      return Result::error("查询失败", 0);
     }
+    return Result::success($result);
   }
 
   /**