|
@@ -1006,7 +1006,7 @@ class WebsiteService implements WebsiteServiceInterface
|
|
|
->where('is_read', 0)
|
|
|
->where('talk_type', 1)
|
|
|
->orderBy('updated_at', 'desc')
|
|
|
- // ->limit(5)
|
|
|
+ ->limit(5)
|
|
|
->get(['id', 'content', 'updated_at'])
|
|
|
->map(function ($item) use ($now) {
|
|
|
$item->class = "单聊";
|
|
@@ -1018,7 +1018,7 @@ class WebsiteService implements WebsiteServiceInterface
|
|
|
->where('talk_type', 2)
|
|
|
->leftJoin('chat_groups', 'chat_records.receiver_id', '=', 'chat_groups.id')
|
|
|
->orderBy('updated_at', 'desc')
|
|
|
- // ->limit(5)
|
|
|
+ ->limit(5)
|
|
|
->get(['chat_records.id', 'content as content1', 'chat_records.updated_at', 'chat_groups.group_name as content'])
|
|
|
->map(function ($item) use ($now) {
|
|
|
$item->class = "群聊";
|
|
@@ -1031,7 +1031,7 @@ class WebsiteService implements WebsiteServiceInterface
|
|
|
->leftJoin('chat_topics_reply', 'chat_topics.id', '=', 'chat_topics_reply.topic_id')
|
|
|
->select('chat_topics.id', 'chat_topics.title as content', 'chat_topics_reply.updated_at as updated_at')
|
|
|
->orderBy('updated_at', 'desc')
|
|
|
- // ->limit(5)
|
|
|
+ ->limit(5)
|
|
|
->get(['chat_topics.id', 'chat_topics.content', 'chat_topics.updated_at'])
|
|
|
->map(function ($item) use ($now) {
|
|
|
$item->class = "话题";
|
|
@@ -1056,7 +1056,7 @@ class WebsiteService implements WebsiteServiceInterface
|
|
|
->orWhereRaw('NOT JSON_CONTAINS(`read_id`, ?)', [$user_id]);
|
|
|
})
|
|
|
->orderBy('updated_at', 'desc')
|
|
|
- // ->limit(5)
|
|
|
+ ->limit(5)
|
|
|
->get(['id', 'title', 'updated_at'])
|
|
|
->map(function ($item) use ($now) {
|
|
|
$item->class = "通知";
|
|
@@ -1070,7 +1070,7 @@ class WebsiteService implements WebsiteServiceInterface
|
|
|
->orWhereRaw('NOT JSON_CONTAINS(`read_id`, ?)', [$user_id]);
|
|
|
})
|
|
|
->orderBy('updated_at', 'desc')
|
|
|
- // ->limit(5)
|
|
|
+ ->limit(5)
|
|
|
->get(['id', 'title', 'updated_at'])
|
|
|
->map(function ($item) use ($now) {
|
|
|
$item->class = "投诉";
|
|
@@ -1119,7 +1119,7 @@ class WebsiteService implements WebsiteServiceInterface
|
|
|
//project company
|
|
|
$res['apply']['project'] = Project::whereIn('status', [0])
|
|
|
->where('user_id', $user_id)->count();
|
|
|
- $res['apply']['company'] = Company::whereIn('status', [0])
|
|
|
+ $res['apply']['count'] = Company::whereIn('status', [0])
|
|
|
->where('user_id', $user_id)->count();
|
|
|
|
|
|
return Result::success($res);
|