|
@@ -6426,24 +6426,28 @@ class NewsService implements NewsServiceInterface
|
|
|
$apply_articale = Article::where('status', 1)
|
|
|
->where('admin_user_id', $user_id)
|
|
|
->orderBy('updated_at', 'desc')
|
|
|
- ->limit(5)->get();
|
|
|
+ // ->limit(5)
|
|
|
+ ->get();
|
|
|
//获取5条单聊未读聊天消息
|
|
|
$chat = ChatRecords::where('is_read', 0)
|
|
|
->where('user_id', $user_id)
|
|
|
->where('talk_type', 1)
|
|
|
->orderBy('created_at', 'desc')
|
|
|
- ->limit(5)->get();
|
|
|
+ // ->limit(5)
|
|
|
+ ->get();
|
|
|
//获取5条未读群聊信息
|
|
|
$chat_group = ChatRecords::where('is_read', 0)
|
|
|
->where('user_id', $user_id)
|
|
|
->where('talk_type', 2)
|
|
|
->orderBy('created_at', 'desc')
|
|
|
- ->limit(5)->get();
|
|
|
+ // ->limit(5)
|
|
|
+ ->get();
|
|
|
//获取5条用户的已审核商品
|
|
|
$good = Good::where('status', 2)
|
|
|
->where('user_id', $user_id)
|
|
|
->orderBy('updated_at', 'desc')
|
|
|
- ->limit(5)->get();
|
|
|
+ // ->limit(5)
|
|
|
+ ->get();
|
|
|
//获取5条用户待审核的公告
|
|
|
$notice = Notice::where('status', 2)
|
|
|
->where('user_id', $user_id)
|
|
@@ -6453,12 +6457,14 @@ class NewsService implements NewsServiceInterface
|
|
|
$complaint = Complaint::where('status', 2)
|
|
|
->where('user_id', $user_id)
|
|
|
->orderBy('updated_at', 'desc')
|
|
|
- ->limit(5)->get();
|
|
|
+ // ->limit(5)
|
|
|
+ ->get();
|
|
|
//获取5条用户的book
|
|
|
$book = Book::where('status', 2)
|
|
|
->where('user_id', $user_id)
|
|
|
->orderBy('updated_at', 'desc')
|
|
|
- ->limit(5)->get();
|
|
|
+ // ->limit(5)
|
|
|
+ ->get();
|
|
|
//获取5条用户的求职
|
|
|
//获取5条用户的求职 1
|
|
|
$job_hunting = JobHunting::where('job_hunting.status', 1)
|
|
@@ -6467,7 +6473,8 @@ class NewsService implements NewsServiceInterface
|
|
|
->leftJoin('website', 'job_hunting.website_id', '=', 'website.id')
|
|
|
->select('job_hunting.*', 'user.nickname as nickname', 'user.user_name as user_name', 'website.website_name as website_name')
|
|
|
->orderBy('updated_at', 'desc')
|
|
|
- ->limit(5)->get();
|
|
|
+ // ->limit(5)
|
|
|
+ ->get();
|
|
|
//获取5条用户的求职 2
|
|
|
$job_recruiting = JobRecruiting::where('job_recruiting.status', 1)
|
|
|
->where('job_recruiting.user_id', $user_id)
|
|
@@ -6475,7 +6482,8 @@ class NewsService implements NewsServiceInterface
|
|
|
->leftJoin('website', 'job_recruiting.website_id', '=', 'website.id')
|
|
|
->select('job_recruiting.*', 'user.nickname as nickname', 'user.user_name as user_name', 'website.website_name as website_name')
|
|
|
->orderBy('updated_at', 'desc')
|
|
|
- ->limit(5)->get();
|
|
|
+ // ->limit(5)
|
|
|
+ ->get();
|
|
|
//人才库 1
|
|
|
$job_apply = JobApply::where('job_apply.status', 1)
|
|
|
->where('job_apply.receiver_id', $user_id)
|
|
@@ -6486,7 +6494,8 @@ class NewsService implements NewsServiceInterface
|
|
|
->select('job_recruiting', 'job_recruiting.', '', '')
|
|
|
->select('job_apply.*', 'user.nickname as nickname', 'user.user_name as user_name', 'website.website_name as website_name', 'job_company.business_name as business_name', 'job_recruiting.title as job_name')
|
|
|
->orderBy('updated_at', 'desc')
|
|
|
- ->limit(5)->get();
|
|
|
+ // ->limit(5)
|
|
|
+ ->get();
|
|
|
// 职场机会 2
|
|
|
$job_resume = JobResume::where('job_resume.status', 1)
|
|
|
->where('job_resume.receiver_id', $user_id)
|
|
@@ -6495,26 +6504,30 @@ class NewsService implements NewsServiceInterface
|
|
|
->leftJoin('job_company', 'job_company.job_id', '=', 'job_resume.recruit_id')
|
|
|
->select('job_resume.*', 'user.nickname as nickname', 'user.user_name as user_name', 'website.website_name as website_name', 'job_company.business_name as business_name')
|
|
|
->orderBy('updated_at', 'desc')
|
|
|
- ->limit(5)->get();
|
|
|
+ // ->limit(5)
|
|
|
+ ->get();
|
|
|
|
|
|
//获取5条用户待处理的投诉
|
|
|
$complaint_deal = Complaint::where('status', 2)
|
|
|
->where('deal', 1)
|
|
|
->whereJsonContains('re_user_ids', $user_id)
|
|
|
->orderBy('updated_at', 'desc')
|
|
|
- ->limit(5)->get();
|
|
|
+ // ->limit(5)
|
|
|
+ ->get();
|
|
|
//获取5条用户的yijing审核公司 :0:未审核;1:已审核;2:已拒绝
|
|
|
|
|
|
$complany = Company::where('status', 1)
|
|
|
->where('user_id', $user_id)
|
|
|
->orderBy('updated_at', 'desc')
|
|
|
- ->limit(5)->get();
|
|
|
+ // ->limit(5)
|
|
|
+ ->get();
|
|
|
|
|
|
//获取5条用户的待审核项目
|
|
|
$project = Project::where('status', 1)
|
|
|
->where('user_id', $user_id)
|
|
|
->orderBy('updated_at', 'desc')
|
|
|
- ->limit(5)->get();
|
|
|
+ // ->limit(5)
|
|
|
+ ->get();
|
|
|
|
|
|
// count($chat) + count($chat_group) +
|
|
|
$count = count($apply_articale) + count($good) + count($notice) + count($complaint) + count($book) + count($job_hunting) + count($job_recruiting) + count($job_apply) + count($job_resume) + count($complaint_deal)
|
|
@@ -6615,13 +6628,15 @@ class NewsService implements NewsServiceInterface
|
|
|
//最近的5篇已审的文章
|
|
|
$apply_articale = Article::where('status', 1)
|
|
|
->where('admin_user_id', $user_id)
|
|
|
- ->limit(5)->get();
|
|
|
+ // ->limit(5)
|
|
|
+ ->get();
|
|
|
|
|
|
//获取5条用户的已审核商品
|
|
|
$good = Good::where('status', 2)
|
|
|
->where('user_id', $user_id)
|
|
|
->orderBy('updated_at', 'desc')
|
|
|
- ->limit(5)->get();
|
|
|
+ // ->limit(5)
|
|
|
+ ->get();
|
|
|
$count = count($apply_articale) + count($good);
|
|
|
$result = [
|
|
|
'apply_articale' => $apply_articale,
|
|
@@ -6634,50 +6649,59 @@ class NewsService implements NewsServiceInterface
|
|
|
//获取未审核的5篇文章
|
|
|
$apply_articale = Article::where('status', 0)
|
|
|
->orderBy('updated_at', 'desc')
|
|
|
- ->limit(5)->get();
|
|
|
+ // ->limit(5)
|
|
|
+ ->get();
|
|
|
//获取5条单聊未读聊天消息
|
|
|
$chat = ChatRecords::where('is_read', 0)
|
|
|
->where('user_id', $user_id)
|
|
|
->where('talk_type', 1)
|
|
|
->orderBy('created_at', 'desc')
|
|
|
- ->limit(5)->get();
|
|
|
+ // ->limit(5)
|
|
|
+ ->get();
|
|
|
//获取5条未读群聊信息
|
|
|
$chat_group = ChatRecords::where('is_read', 0)
|
|
|
->where('user_id', $user_id)
|
|
|
->where('talk_type', 2)
|
|
|
->orderBy('created_at', 'desc')
|
|
|
- ->limit(5)->get();
|
|
|
+ // ->limit(5)
|
|
|
+ ->get();
|
|
|
//获取5条用户的已审核商品
|
|
|
$good = Good::where('status', 1)
|
|
|
// ->where('user_id', $user_id)
|
|
|
->orderBy('updated_at', 'desc')
|
|
|
- ->limit(5)->get();
|
|
|
+ // ->limit(5)
|
|
|
+ ->get();
|
|
|
//获取5条用户待审核的公告
|
|
|
$notice = Notice::where('status', 1)
|
|
|
->orderBy('updated_at', 'desc')
|
|
|
- ->limit(5)->get();
|
|
|
+ // ->limit(5)
|
|
|
+ ->get();
|
|
|
//获取5条用户的待审核投诉
|
|
|
$complaint = Complaint::where('status', 1)
|
|
|
->orderBy('updated_at', 'desc')
|
|
|
- ->limit(5)->get();
|
|
|
+ // ->limit(5)
|
|
|
+ ->get();
|
|
|
//获取5条用户的book
|
|
|
$book = Book::where('status', 1)
|
|
|
->orderBy('updated_at', 'desc')
|
|
|
- ->limit(5)->get();
|
|
|
+ // ->limit(5)
|
|
|
+ ->get();
|
|
|
//获取5条用户的求职 1
|
|
|
$job_hunting = JobHunting::where('job_hunting.status', 1)
|
|
|
->leftJoin('user', 'job_hunting.user_id', '=', 'user.id')
|
|
|
->leftJoin('website', 'job_hunting.website_id', '=', 'website.id')
|
|
|
->select('job_hunting.*', 'user.nickname as nickname', 'user.user_name as user_name', 'website.website_name as website_name')
|
|
|
->orderBy('updated_at', 'desc')
|
|
|
- ->limit(5)->get();
|
|
|
+ // ->limit(5)
|
|
|
+ ->get();
|
|
|
//获取5条用户的求职 2
|
|
|
$job_recruiting = JobRecruiting::where('job_recruiting.status', 1)
|
|
|
->leftJoin('user', 'job_recruiting.user_id', '=', 'user.id')
|
|
|
->leftJoin('website', 'job_recruiting.website_id', '=', 'website.id')
|
|
|
->select('job_recruiting.*', 'user.nickname as nickname', 'user.user_name as user_name', 'website.website_name as website_name')
|
|
|
->orderBy('updated_at', 'desc')
|
|
|
- ->limit(5)->get();
|
|
|
+ // ->limit(5)
|
|
|
+ ->get();
|
|
|
//人才库 1
|
|
|
$job_apply = JobApply::where('job_apply.status', 1)
|
|
|
->leftJoin('user', 'job_apply.user_id', '=', 'user.id')
|
|
@@ -6686,7 +6710,8 @@ class NewsService implements NewsServiceInterface
|
|
|
->leftJoin('job_recruiting', 'job_recruiting.id', '=', 'job_apply.recruit_id')
|
|
|
->select('job_apply.*', 'user.nickname as nickname', 'user.user_name as user_name', 'website.website_name as website_name', 'job_company.business_name as business_name', 'job_recruiting.title as job_name')
|
|
|
->orderBy('updated_at', 'desc')
|
|
|
- ->limit(5)->get();
|
|
|
+ // ->limit(5)
|
|
|
+ ->get();
|
|
|
// 职场机会 2
|
|
|
$job_resume = JobResume::where('job_resume.status', 1)
|
|
|
->leftJoin('user', 'job_resume.receiver_id', '=', 'user.id')
|
|
@@ -6694,12 +6719,17 @@ class NewsService implements NewsServiceInterface
|
|
|
->leftJoin('job_company', 'job_company.job_id', '=', 'job_resume.recruit_id')
|
|
|
->select('job_resume.*', 'user.nickname as nickname', 'user.user_name as user_name', 'website.website_name as website_name', 'job_company.business_name as business_name')
|
|
|
->orderBy('updated_at', 'desc')
|
|
|
- ->limit(5)->get();
|
|
|
+ // ->limit(5)
|
|
|
+ ->get();
|
|
|
//待审核数据com pro
|
|
|
$complany = Company::where('status', 0)
|
|
|
- ->orderBy('updated_at', 'desc')->limit(5)->get();
|
|
|
+ ->orderBy('updated_at', 'desc')
|
|
|
+ // ->limit(5)
|
|
|
+ ->get();
|
|
|
$project = Project::where('status', 0)
|
|
|
- ->orderBy('updated_at', 'desc')->limit(5)->get();
|
|
|
+ ->orderBy('updated_at', 'desc')
|
|
|
+ // ->limit(5)
|
|
|
+ ->get();
|
|
|
|
|
|
|
|
|
$count = count($chat) + count($chat_group) + count($apply_articale) + count($good) + count($notice) + count($complaint) + count($book) + count($job_hunting) + count($job_recruiting)
|