|
@@ -6421,7 +6421,7 @@ class NewsService implements NewsServiceInterface
|
|
|
// '1:个人会员 2:政务会员 3:企业会员 4:调研员 10000:管理员 20000:游客(小程序)
|
|
|
$user_id = isset($data['user_id']) ? $data['user_id'] : 0; //用户id
|
|
|
$result = [];
|
|
|
- if ($type_id == 1 or $type_id == 2 or $type_id == 3) {
|
|
|
+ if ($type_id == 1 or $type_id == 2 or $type_id == 3 or $type_id == 4) {
|
|
|
//最近的5篇已审的文章
|
|
|
$apply_articale = Article::where('status', 1)
|
|
|
->where('admin_user_id', $user_id)
|
|
@@ -6511,25 +6511,25 @@ class NewsService implements NewsServiceInterface
|
|
|
|
|
|
|
|
|
//获取5条单聊未读聊天消息
|
|
|
- $chat = ChatRecords::where('is_read', 0)
|
|
|
- ->where('user_id', $user_id)
|
|
|
- ->leftJoin('user', 'chat_records.receiver_id', '=', 'user.id')
|
|
|
-
|
|
|
- ->select('chat_records.*', 'user.nickname as nickname', 'user.user_name as user_name')
|
|
|
- ->where('action', 'recieved')
|
|
|
- ->where('talk_type', 1)
|
|
|
- ->orderBy('created_at', 'desc')
|
|
|
- // ->limit(5)
|
|
|
- ->get();
|
|
|
+ // $chat = ChatRecords::where('is_read', 0)
|
|
|
+ // ->where('user_id', $user_id)
|
|
|
+ // ->leftJoin('user', 'chat_records.receiver_id', '=', 'user.id')
|
|
|
+
|
|
|
+ // ->select('chat_records.*', 'user.nickname as nickname', 'user.user_name as user_name')
|
|
|
+ // ->where('action', 'recieved')
|
|
|
+ // ->where('talk_type', 1)
|
|
|
+ // ->orderBy('created_at', 'desc')
|
|
|
+ // // ->limit(5)
|
|
|
+ // ->get();
|
|
|
//获取5条未读群聊信息
|
|
|
- $chat_group = ChatRecords::where('is_read', 0)
|
|
|
- ->leftJoin('chat_groups', 'chat_records.receiver_id', '=', 'chat_groups.id')
|
|
|
- ->select('chat_records.*', 'chat_groups.group_name as user_name')
|
|
|
- ->where('user_id', $user_id)
|
|
|
- ->where('talk_type', 2)
|
|
|
- ->orderBy('created_at', 'desc')
|
|
|
- // ->limit(5)
|
|
|
- ->get();
|
|
|
+ // $chat_group = ChatRecords::where('is_read', 0)
|
|
|
+ // ->leftJoin('chat_groups', 'chat_records.receiver_id', '=', 'chat_groups.id')
|
|
|
+ // ->select('chat_records.*', 'chat_groups.group_name as user_name')
|
|
|
+ // ->where('user_id', $user_id)
|
|
|
+ // ->where('talk_type', 2)
|
|
|
+ // ->orderBy('created_at', 'desc')
|
|
|
+ // // ->limit(5)
|
|
|
+ // ->get();
|
|
|
|
|
|
//获取5条用户的待审核项目
|
|
|
$project = Project::where('status', 1)
|
|
@@ -6546,8 +6546,8 @@ class NewsService implements NewsServiceInterface
|
|
|
;
|
|
|
$result = [
|
|
|
'apply_articale' => $apply_articale,
|
|
|
- 'chat' => $chat,
|
|
|
- 'chat_group' => $chat_group,
|
|
|
+ // 'chat' => $chat,
|
|
|
+ // 'chat_group' => $chat_group,
|
|
|
'good' => $good,
|
|
|
'notice' => $notice,
|
|
|
'complaint' => $complaint,
|
|
@@ -6559,7 +6559,6 @@ class NewsService implements NewsServiceInterface
|
|
|
'complaint_deal' => $complaint_deal,
|
|
|
'complany' => $complany,
|
|
|
'project' => $project,
|
|
|
-
|
|
|
'count' => $count,
|
|
|
];
|
|
|
} elseif ($type_id == 12) {
|
|
@@ -6633,7 +6632,7 @@ class NewsService implements NewsServiceInterface
|
|
|
'good' => $good,
|
|
|
'count' => $count,
|
|
|
];
|
|
|
- } elseif ($type_id == 4) {
|
|
|
+ } elseif ($type_id == 14) {
|
|
|
//最近的5篇已审的文章
|
|
|
$apply_articale = Article::where('status', 1)
|
|
|
->where('admin_user_id', $user_id)
|
|
@@ -6662,25 +6661,25 @@ class NewsService implements NewsServiceInterface
|
|
|
->get();
|
|
|
//获取5条单聊未读聊天消息
|
|
|
//获取5条单聊未读聊天消息
|
|
|
- $chat = ChatRecords::where('is_read', 0)
|
|
|
- ->where('user_id', $user_id)
|
|
|
- ->leftJoin('user', 'chat_records.receiver_id', '=', 'user.id')
|
|
|
-
|
|
|
- ->select('chat_records.*', 'user.nickname as nickname', 'user.user_name as user_name')
|
|
|
- ->where('action', 'recieved')
|
|
|
- ->where('talk_type', 1)
|
|
|
- ->orderBy('created_at', 'desc')
|
|
|
- // ->limit(5)
|
|
|
- ->get();
|
|
|
- //获取5条未读群聊信息
|
|
|
- $chat_group = ChatRecords::where('is_read', 0)
|
|
|
- ->leftJoin('chat_groups', 'chat_records.receiver_id', '=', 'chat_groups.id')
|
|
|
- ->select('chat_records.*', 'chat_groups.group_name as user_name')
|
|
|
- ->where('user_id', $user_id)
|
|
|
- ->where('talk_type', 2)
|
|
|
- ->orderBy('created_at', 'desc')
|
|
|
- // ->limit(5)
|
|
|
- ->get();
|
|
|
+ // $chat = ChatRecords::where('is_read', 0)
|
|
|
+ // ->where('user_id', $user_id)
|
|
|
+ // ->leftJoin('user', 'chat_records.receiver_id', '=', 'user.id')
|
|
|
+
|
|
|
+ // ->select('chat_records.*', 'user.nickname as nickname', 'user.user_name as user_name')
|
|
|
+ // ->where('action', 'recieved')
|
|
|
+ // ->where('talk_type', 1)
|
|
|
+ // ->orderBy('created_at', 'desc')
|
|
|
+ // // ->limit(5)
|
|
|
+ // ->get();
|
|
|
+ // //获取5条未读群聊信息
|
|
|
+ // $chat_group = ChatRecords::where('is_read', 0)
|
|
|
+ // ->leftJoin('chat_groups', 'chat_records.receiver_id', '=', 'chat_groups.id')
|
|
|
+ // ->select('chat_records.*', 'chat_groups.group_name as user_name')
|
|
|
+ // ->where('user_id', $user_id)
|
|
|
+ // ->where('talk_type', 2)
|
|
|
+ // ->orderBy('created_at', 'desc')
|
|
|
+ // // ->limit(5)
|
|
|
+ // ->get();
|
|
|
//获取5条用户的已审核商品
|
|
|
$good = Good::where('status', 1)
|
|
|
// ->where('user_id', $user_id)
|
|
@@ -6748,15 +6747,18 @@ class NewsService implements NewsServiceInterface
|
|
|
->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 =
|
|
|
+ // 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,
|
|
|
- 'chat_group' => $chat_group,
|
|
|
+ // 'chat' => $chat,
|
|
|
+ // 'chat_group' => $chat_group,
|
|
|
'good' => $good,
|
|
|
'notice' => $notice,
|
|
|
'complaint' => $complaint,
|