From 89e789ca19037215f7a9a222522a43e955e3abe6 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Thu, 7 Sep 2023 21:12:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20app/common/logic/task/Task?= =?UTF-8?q?Logic.php?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复判断错误 --- app/common/logic/task/TaskLogic.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/app/common/logic/task/TaskLogic.php b/app/common/logic/task/TaskLogic.php index 0f7d93376..c9e10c474 100644 --- a/app/common/logic/task/TaskLogic.php +++ b/app/common/logic/task/TaskLogic.php @@ -75,13 +75,12 @@ class TaskLogic extends BaseLogic { try { if ($v['types'] == 3) { - return true; - // $task = Task::where('template_id', $v['id'])->find(); - // if ($task) { - // Task::where('template_id', $v['id'])->update(['start_time' => strtotime($task['start_time']) + 86400, 'end_time' => strtotime($task['end_time']) + 86400]); - // TaskTemplate::where('id', $v['id'])->inc('day_count')->update(); - // return true; - // } + $task = Task::where('template_id', $v['id'])->find(); + if ($task) { + // Task::where('template_id', $v['id'])->update(['start_time' => strtotime($task['start_time']) + 86400, 'end_time' => strtotime($task['end_time']) + 86400]); + // TaskTemplate::where('id', $v['id'])->inc('day_count')->update(); + return true; + } } $time = strtotime(date('Y-m-d')); $TaskSchedulingPlan_data = [