From b5c256f2c50a6f09fec5f4ca3e293573d3ef5771 Mon Sep 17 00:00:00 2001 From: wong <106998207@qq.com> Date: Wed, 2 Jul 2025 09:34:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E9=80=81=E6=9C=8B=E5=8F=8B=E5=9C=88?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=97=B6=E9=97=B4=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Server/application/job/WorkbenchMomentsJob.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Server/application/job/WorkbenchMomentsJob.php b/Server/application/job/WorkbenchMomentsJob.php index 36d46ec1..a24baf8a 100644 --- a/Server/application/job/WorkbenchMomentsJob.php +++ b/Server/application/job/WorkbenchMomentsJob.php @@ -76,7 +76,13 @@ class WorkbenchMomentsJob if (!$config) { continue; } - + $startTime = strtotime(date('Y-m-d '. $config['startTime'])); + $endTime = strtotime(date('Y-m-d '. $config['endTime'])); + // 如果时间不符,则跳过 + if($startTime > time() || $endTime < time()){ + continue; + } + // 获取设备 $devices = $this->getDevice($workbench, $config); if (empty($devices)) { @@ -267,7 +273,7 @@ class WorkbenchMomentsJob protected function getContentLibrary($workbench, $config) { $contentids = json_decode($config['contentLibraries'], true); - if (empty($contentids)) { + if (empty($contentids)) { return false; }