LiuJ 3 هفته پیش
والد
کامیت
4d39ff8821
1فایلهای تغییر یافته به همراه9 افزوده شده و 3 حذف شده
  1. 9 3
      app/JsonRpc/NewsService.php

+ 9 - 3
app/JsonRpc/NewsService.php

@@ -1797,7 +1797,9 @@ class NewsService implements NewsServiceInterface
             ];
         } elseif ($type_id == 2) {
             //最近的5篇已审的文章
-            $apply_articale = Article::where('status', 1)->limit(5)->get();
+            $apply_articale = Article::where('status', 1)
+                ->where('admin_user_id', $user_id)
+                ->limit(5)->get();
             //获取5条单聊未读聊天消息
             $chat = ChatRecords::where('is_read', 0)
                 ->where('user_id', $user_id)
@@ -1819,7 +1821,9 @@ class NewsService implements NewsServiceInterface
             ];
         } elseif ($type_id == 3) {
             //最近的5篇已审的文章
-            $apply_articale = Article::where('status', 1)->limit(5)->get();
+            $apply_articale = Article::where('status', 1)
+                ->where('admin_user_id', $user_id)
+                ->limit(5)->get();
             //获取5条单聊未读聊天消息
             $chat = ChatRecords::where('is_read', 0)
                 ->where('user_id', $user_id)
@@ -1841,7 +1845,9 @@ class NewsService implements NewsServiceInterface
             ];
         } elseif ($type_id == 4) {
             //最近的5篇已审的文章
-            $apply_articale = Article::where('status', 1)->limit(5)->get();
+            $apply_articale = Article::where('status', 1)
+                ->where('admin_user_id', $user_id)
+                ->limit(5)->get();
 
             $count = count($apply_articale);
             $result = [