|
@@ -773,13 +773,26 @@ class WebsiteService implements WebsiteServiceInterface
|
|
|
->get();
|
|
|
$res['letterOfComplaintList'] = $result;
|
|
|
$res['article'] = $article;
|
|
|
- $res['article']['count'] = Article::whereNotIn('status', ['404'])->where('admin_user_id', $user_id)->count();
|
|
|
- $res['good']['count'] = Good::where([])->where('user_id', $user_id)->count();
|
|
|
- $res['book']['count'] = Book::where([])->where('user_id', $user_id)->count();
|
|
|
- $res['jobHunting']['count'] = JobHunting::where([])->where('user_id', $user_id)->count();
|
|
|
- $res['jobRecruiting']['count'] = JobRecruiting::where([])->where('user_id', $user_id)->count();
|
|
|
- $res['complaint']['count'] = Complaint::where([])->where('user_id', $user_id)->count();
|
|
|
- $res['notice']['count'] = Notice::where([])->where('user_id', $user_id)->count();
|
|
|
+ $res['website']['count'] = Website::where([])->count();
|
|
|
+ $res['article']['count'] = Article::whereIn('status', [1])->where('admin_user_id', $user_id)->count();
|
|
|
+ $res['category']['count'] = Category::where([])->count();
|
|
|
+ $res['good']['count'] = Good::whereIn('status', [2])
|
|
|
+ ->where('user_id', $user_id)->count();
|
|
|
+ $res['book']['count'] = Book::whereIn('status', [2])
|
|
|
+ ->where('user_id', $user_id)->count();
|
|
|
+ $res['jobHunting']['count'] = JobHunting::whereIn('status', [2])
|
|
|
+ ->where('user_id', $user_id)->count();
|
|
|
+ $res['jobRecruiting']['count'] = JobRecruiting::whereIn('status', [1])
|
|
|
+ ->where('user_id', $user_id)->count();
|
|
|
+ $res['complaint']['count'] = Complaint::whereIn('status', [2])
|
|
|
+ ->where('user_id', $user_id)->count();
|
|
|
+ $res['notice']['count'] = Notice::whereIn('status', [2])
|
|
|
+ ->where('user_id', $user_id)->count();
|
|
|
+ //company project 0 待审核 1 已审核
|
|
|
+ $res['company']['count'] = Company::whereIn('status', [1])
|
|
|
+ ->where('user_id', $user_id)->count();
|
|
|
+ $res['project']['count'] = Project::whereIn('status', [1])
|
|
|
+ ->where('user_id', $user_id)->count();
|
|
|
|
|
|
//待审核数据
|
|
|
$res['apply']['article'] = Article::where(['status' => 0])->where('admin_user_id', $user_id)->count(); //
|
|
@@ -789,6 +802,9 @@ class WebsiteService implements WebsiteServiceInterface
|
|
|
$res['apply']['jobRecruiting'] = JobRecruiting::where(['status' => 0])->where('user_id', $user_id)->count();
|
|
|
$res['apply']['complaint'] = Complaint::where(['status' => 1])->where('user_id', $user_id)->count();
|
|
|
$res['apply']['notice'] = Notice::where(['status' => 1])->where('user_id', $user_id)->count();
|
|
|
+ //company project 1 已审核
|
|
|
+ $res['apply']['company'] = Company::where(['status' => 0])->where('user_id', $user_id)->count();
|
|
|
+ $res['apply']['project'] = Project::where(['status' => 0])->where('user_id', $user_id)->count();
|
|
|
|
|
|
return Result::success($res);
|
|
|
case 10000:
|
|
@@ -820,6 +836,9 @@ class WebsiteService implements WebsiteServiceInterface
|
|
|
$res['jobRecruiting']['count'] = JobRecruiting::whereIn('status', [1])->count();
|
|
|
$res['complaint']['count'] = Complaint::whereIn('status', [2])->count();
|
|
|
$res['notice']['count'] = Notice::whereIn('status', [2])->count();
|
|
|
+ //已审核数量
|
|
|
+ $res['company']['count'] = Company::whereIn('status', [1])->count();
|
|
|
+ $res['project']['count'] = Project::whereIn('status', [1])->count();
|
|
|
|
|
|
// $res['monthArticle'] = Db::select('SELECT DATE(created_at) AS date,COUNT(*) AS total_count FROM article WHERE created_at >= CURDATE() - INTERVAL 30 DAY GROUP BY DATE(created_at) ORDER BY date ASC;');
|
|
|
$res['monthArticle'] = Db::select(' SELECT DATE(article.created_at) AS date,COUNT(*) AS count ,user.type_id FROM article left JOIN user on article.admin_user_id = user.id WHERE
|
|
@@ -1108,6 +1127,13 @@ class WebsiteService implements WebsiteServiceInterface
|
|
|
$res['project']['count'] = Project::whereIn('status', [1])
|
|
|
->where('user_id', $user_id)->count();
|
|
|
|
|
|
+ //待处理的complaint
|
|
|
+ $res['complaint_deal']['count'] = Complaint::where(['status' => 2])
|
|
|
+ ->where('deal', 1)
|
|
|
+ // ->where('user_id', $user_id)
|
|
|
+ ->whereJsonContains('re_user_ids', $user_id)
|
|
|
+ ->count();
|
|
|
+
|
|
|
//待审核数据
|
|
|
$res['apply']['article'] = Article::where(['status' => 0])->where('admin_user_id', $user_id)->count(); //
|
|
|
$res['apply']['good'] = Good::where(['status' => 1])->where('user_id', $user_id)->count();
|
|
@@ -1119,7 +1145,7 @@ class WebsiteService implements WebsiteServiceInterface
|
|
|
//project company
|
|
|
$res['apply']['project'] = Project::whereIn('status', [0])
|
|
|
->where('user_id', $user_id)->count();
|
|
|
- $res['apply']['count'] = Company::whereIn('status', [0])
|
|
|
+ $res['apply']['company'] = Company::whereIn('status', [0])
|
|
|
->where('user_id', $user_id)->count();
|
|
|
|
|
|
return Result::success($res);
|