perf: 今天任务、我的任务

This commit is contained in:
kuaifan
2021-12-22 22:39:08 +08:00
parent 6d9237c399
commit 6c34f083e3
4 changed files with 11 additions and 7 deletions

View File

@@ -38,7 +38,7 @@ class ProjectController extends AbstractController
Carbon::today()->startOfDay(),
Carbon::today()->endOfDay()
];
$data['today'] = ProjectTask::authData()->whereParentId(0)
$data['today'] = ProjectTask::authData(null, true)->whereParentId(0)
->whereNull('archived_at')
->whereNull('complete_at')
->where(function ($query) use ($between) {
@@ -47,7 +47,7 @@ class ProjectController extends AbstractController
->count();
// 超期未完成
$data['overdue'] = ProjectTask::authData()->whereParentId(0)
$data['overdue'] = ProjectTask::authData(null, true)->whereParentId(0)
->whereNull('archived_at')
->whereNull('complete_at')
->whereNotNull('end_at')