From 3d9b9e813e673bd0288e72084b977fd03ed1b38d Mon Sep 17 00:00:00 2001 From: Lemon <15040771@qq.com> Date: Wed, 16 Sep 2020 19:41:16 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=81=E8=BE=BE=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Service/v3/Implementations/AppointmentTimeService.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/Service/v3/Implementations/AppointmentTimeService.php b/app/Service/v3/Implementations/AppointmentTimeService.php index a3b546c..f784317 100644 --- a/app/Service/v3/Implementations/AppointmentTimeService.php +++ b/app/Service/v3/Implementations/AppointmentTimeService.php @@ -101,11 +101,7 @@ class AppointmentTimeService implements AppointmentTimeServiceInterface $peakPeriod = strtotime('16:00'); $peakPeriodEnd = strtotime('18:00'); //取得订单下所有店铺时间段 交集 并计算时间段横跨单位区间长度 - if($endTime == $startTime){ - $length = 1; - }else{ - $length = ceil(($endTime - $startTime) / (30*60)); - } + $length = ceil(($endTime - $startTime) / (30*60)) + 1; for ($i=1;$i<=$length;$i++){ $addTime = $startTime + (30*60*$i); if($addTime >= $peakPeriod && $addTime < $peakPeriodEnd){