|
@@ -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) {
|