|
@@ -761,52 +761,6 @@ class WebsiteService implements WebsiteServiceInterface
|
|
|
{
|
|
|
var_dump("用户类型:", $data);
|
|
|
switch ($data['type_id']) {
|
|
|
- case 4:
|
|
|
- $result = Db::select('SELECT DATE(created_at) AS date,COUNT(*) AS total_count FROM letter_of_complaint WHERE created_at >= CURDATE() - INTERVAL 30 DAY GROUP BY DATE(created_at) ORDER BY date ASC;');
|
|
|
- $res = [];
|
|
|
- //查询已审核文章
|
|
|
- $user_id = $data['user_id'];
|
|
|
- $article = Article::where('status', 1)
|
|
|
- ->where('admin_user_id', $user_id)
|
|
|
- ->orderBy('updated_at', 'desc')
|
|
|
- ->limit(10)
|
|
|
- ->get();
|
|
|
- $res['letterOfComplaintList'] = $result;
|
|
|
- $res['article'] = $article;
|
|
|
- $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(); //
|
|
|
- $res['apply']['good'] = Good::where(['status' => 1])->where('user_id', $user_id)->count();
|
|
|
- $res['apply']['book'] = Book::where(['status' => 1])->where('user_id', $user_id)->count();
|
|
|
- $res['apply']['jobHunting'] = JobHunting::where(['status' => 1])->where('user_id', $user_id)->count();
|
|
|
- $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:
|
|
|
$res = [];
|
|
|
//网站
|
|
@@ -876,10 +830,24 @@ class WebsiteService implements WebsiteServiceInterface
|
|
|
case 1:
|
|
|
case 2:
|
|
|
case 3:
|
|
|
+ case 4:
|
|
|
$res = [];
|
|
|
+ if ($data['type_id'] == 4) {
|
|
|
+ $result = Db::select('SELECT DATE(created_at) AS date,COUNT(*) AS total_count FROM letter_of_complaint WHERE created_at >= CURDATE() - INTERVAL 30 DAY GROUP BY DATE(created_at) ORDER BY date ASC;');
|
|
|
+ $res = [];
|
|
|
+ //查询已审核文章
|
|
|
+ $user_id = $data['user_id'];
|
|
|
+ $article = Article::where('status', 1)
|
|
|
+ ->where('admin_user_id', $user_id)
|
|
|
+ ->orderBy('updated_at', 'desc')
|
|
|
+ ->limit(10)
|
|
|
+ ->get();
|
|
|
+ $res['letterOfComplaintList'] = $result;
|
|
|
+ $res['article'] = $article;
|
|
|
+ }
|
|
|
+
|
|
|
//查询已审核文章
|
|
|
$user_id = $data['user_id'];
|
|
|
-
|
|
|
$now = Carbon::now();
|
|
|
// 系统提醒审核消息
|
|
|
$sys_msg = [];
|
|
@@ -1133,7 +1101,6 @@ class WebsiteService implements WebsiteServiceInterface
|
|
|
// ->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();
|
|
@@ -1147,10 +1114,8 @@ class WebsiteService implements WebsiteServiceInterface
|
|
|
->where('user_id', $user_id)->count();
|
|
|
$res['apply']['company'] = Company::whereIn('status', [0])
|
|
|
->where('user_id', $user_id)->count();
|
|
|
-
|
|
|
return Result::success($res);
|
|
|
}
|
|
|
-
|
|
|
return [];
|
|
|
}
|
|
|
|