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

+ 36 - 3
app/JsonRpc/NewsService.php

@@ -25,6 +25,7 @@ use App\Model\News;
 use App\Model\UserInfo;
 use App\Model\WebsiteGroup;;
 
+
 use App\Model\JobResume;
 
 use Hyperf\DbConnection\Db;
@@ -6502,8 +6503,25 @@ class NewsService implements NewsServiceInterface
         ->whereJsonContains('re_user_ids', $user_id)
         ->orderBy('updated_at', 'desc')
         ->limit(5)->get();
+      //获取5条用户的yijing审核公司 :0:未审核;1:已审核;2:已拒绝
+
+      $complany = Company::where('status', 1)
+        ->where('user_id', $user_id)
+        ->orderBy('updated_at', 'desc')
+        ->limit(5)->get();
+
+      //获取5条用户的待审核项目 
+      $project = Project::where('status', 1)
+        ->where('user_id', $user_id)
+        ->orderBy('updated_at', 'desc')
+        ->limit(5)->get();
+
       // count($chat) + count($chat_group) +
-      $count = count($apply_articale) + count($good) + count($notice) + count($complaint) + count($book) + count($job_hunting) + count($job_recruiting) + count($job_apply) + count($job_resume) + count($complaint_deal);
+      $count = count($apply_articale) + count($good) + count($notice) + count($complaint) + count($book) + count($job_hunting) + count($job_recruiting) + count($job_apply) + count($job_resume) + count($complaint_deal)
+        + count($complany)
+        + count($project)
+        // + count($chat) + count($chat_group)
+      ;
       $result = [
         'apply_articale' => $apply_articale,
         'chat' => $chat,
@@ -6517,6 +6535,9 @@ class NewsService implements NewsServiceInterface
         'job_apply' => $job_apply,
         'job_resume' => $job_resume,
         'complaint_deal' => $complaint_deal,
+        'complany' => $complany,
+        'project' => $project,
+
         'count' => $count,
       ];
     } elseif ($type_id == 12) {
@@ -6674,8 +6695,18 @@ class NewsService implements NewsServiceInterface
         ->select('job_resume.*', 'user.nickname as nickname', 'user.user_name as user_name', 'website.website_name as website_name', 'job_company.business_name as business_name')
         ->orderBy('updated_at', 'desc')
         ->limit(5)->get();
-
-      $count = count($chat) + count($chat_group) + count($apply_articale) + count($good) + count($notice) + count($complaint) + count($book) + count($job_hunting) + count($job_recruiting) + count($job_apply) + count($job_resume);
+      //待审核数据com pro
+      $complany = Company::where('status', 0)
+        ->orderBy('updated_at', 'desc')->limit(5)->get();
+      $project = Project::where('status', 0)
+        ->orderBy('updated_at', 'desc')->limit(5)->get();
+
+
+      $count = count($chat) + count($chat_group) + count($apply_articale) + count($good) + count($notice) + count($complaint) + count($book) + count($job_hunting) + count($job_recruiting)
+        + count($job_apply)
+        + count($job_resume)
+        + count($complany)
+        + count($project);
       $result = [
         'apply_articale' => $apply_articale,
         'chat' => $chat,
@@ -6688,6 +6719,8 @@ class NewsService implements NewsServiceInterface
         'job_recruiting' => $job_recruiting,
         'job_apply' => $job_apply,
         'job_resume' => $job_resume,
+        'complany' => $complany,
+        'project' => $project,
         'count' => $count,
       ];
     } elseif ($type_id == 20000) {