LiuJ há 6 dias atrás
pai
commit
02c186aceb
1 ficheiros alterados com 21 adições e 0 exclusões
  1. 21 0
      app/JsonRpc/NewsService.php

+ 21 - 0
app/JsonRpc/NewsService.php

@@ -2642,12 +2642,33 @@ class NewsService implements NewsServiceInterface
                 ->where('user_id', $user_id)
                 ->orderBy('updated_at', 'desc')
                 ->limit(5)->get();
+            //获取5条用户待审核的公告
+            $notice = Notice::where('status', 1)
+                ->orderBy('updated_at', 'desc')
+                ->limit(5)->get();
+            //获取5条用户的待审核投诉
+            $complaint = Complaint::where('status', 1)
+                ->orderBy('updated_at', 'desc')
+                ->limit(5)->get();
+
+            //获取5条用户的book
+            $book = Book::where('status', 1)
+                ->orderBy('updated_at', 'desc')
+                ->limit(5)->get();
+            //获取5条用户的求职
+            $job_hunting = JobHunting::where('status', 1)
+                ->orderBy('updated_at', 'desc')
+                ->limit(5)->get();
             $count = count($chat) + count($chat_group) + count($apply_articale) + count($good);
             $result = [
                 'apply_articale' => $apply_articale,
                 'chat' => $chat,
                 'chat_group' => $chat_group,
                 'good' => $good,
+                'notice' => $notice,
+                'complaint' => $complaint,
+                'book' => $book,
+                'job_hunting' => $job_hunting,
                 'count' => $count,
             ];
         } elseif ($type_id == 2) {