mirror of
https://github.com/kuaifan/dootask.git
synced 2026-01-15 11:18:12 +00:00
fix: 任务提醒时间格式错误修改
This commit is contained in:
parent
b332c4e23d
commit
6f8a4af5eb
@ -24,20 +24,18 @@ class OverdueRemindEmailTask extends AbstractTask
|
|||||||
$taskLists1 = [];
|
$taskLists1 = [];
|
||||||
$taskLists2 = [];
|
$taskLists2 = [];
|
||||||
if ($hours > 0) {
|
if ($hours > 0) {
|
||||||
$time1 = Carbon::now()->addMinutes($hours * 60);
|
|
||||||
$taskLists1 = ProjectTask::whereNull('complete_at')
|
$taskLists1 = ProjectTask::whereNull('complete_at')
|
||||||
->where('end_at', '>=', $time1->subMinutes(30))
|
->where('end_at', '>=', Carbon::now()->addMinutes($hours * 60 - 30)->rawFormat('Y-m-d H:i:s'))
|
||||||
->where('end_at', '<=', $time1->addMinutes(30))
|
->where('end_at', '<=', Carbon::now()->addMinutes($hours * 60 + 30)->rawFormat('Y-m-d H:i:s'))
|
||||||
->whereNull('archived_at')
|
->whereNull('archived_at')
|
||||||
->take(100)
|
->take(100)
|
||||||
->get()
|
->get()
|
||||||
->toArray();
|
->toArray();
|
||||||
}
|
}
|
||||||
if ($hours2 > 0) {
|
if ($hours2 > 0) {
|
||||||
$time2 = Carbon::now()->subMinutes($hours2 * 60);
|
|
||||||
$taskLists2 = ProjectTask::whereNull('complete_at')
|
$taskLists2 = ProjectTask::whereNull('complete_at')
|
||||||
->where('end_at', '>=', $time2->subMinutes(30))
|
->where('end_at', '>=', Carbon::now()->subMinutes($hours2 * 60 - 30)->rawFormat('Y-m-d H:i:s'))
|
||||||
->where('end_at', '<=', $time2->addMinutes(30))
|
->where('end_at', '<=', Carbon::now()->subMinutes($hours * 60 + 30)->rawFormat('Y-m-d H:i:s'))
|
||||||
->whereNull('archived_at')
|
->whereNull('archived_at')
|
||||||
->take(100)
|
->take(100)
|
||||||
->get()
|
->get()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user