From e8c33399bf57714066f5d8b3cae0d3e1f562dfb7 Mon Sep 17 00:00:00 2001 From: wucongxing8150 <815046773@qq.com> Date: Tue, 16 Apr 2024 15:00:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=BA=E5=B9=B4=E6=9C=88?= =?UTF-8?q?=E6=97=A5=E6=97=B6=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/OrderServicePackageService.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/app/Services/OrderServicePackageService.php b/app/Services/OrderServicePackageService.php index 2f3152a..5beb30a 100644 --- a/app/Services/OrderServicePackageService.php +++ b/app/Services/OrderServicePackageService.php @@ -1110,8 +1110,8 @@ class OrderServicePackageService extends BaseService $days = (int)$month_time * 30; // 获取开始日期 - $end_date = date('Y-m-d 23:59:59', strtotime($start_time . " +$days days")); - $start_date = date('Y-m-d 00:00:00', strtotime($end_date . "-30 days")); + $end_date = date('Y-m-d H:i:s', strtotime($start_time . " +$days days")); + $start_date = date('Y-m-d H:i:s', strtotime($end_date . "-30 days")); $InquiryService = new InquiryService(); $order_inquiry = $InquiryService->getPatientServiceInquiry($service_type, $user_id, $doctor_id, $start_date, $end_date); @@ -1129,9 +1129,6 @@ class OrderServicePackageService extends BaseService */ public function getCurrentMonthDate(string $start_time): array { - $current_month_start_date = 0; // 当前所属月开始时间 - $current_month_finish_date = 0; // 当前所属月结束时间 - // 获取开启服务日期和今日的相差天数 $diff = abs(time() - strtotime($start_time)); $diff_days = ceil($diff / (60 * 60 * 24)); // 转换为天数 @@ -1142,10 +1139,10 @@ class OrderServicePackageService extends BaseService $days = (int)$month_time * 30; // 当前所属月开始时间 - $current_month_finish_date = date('Y-m-d 23:59:59', strtotime($start_time . " +$days days")); + $current_month_finish_date = date('Y年m月d日 H时i分', strtotime($start_time . " +$days days")); // 当前所属月结束时间 - $current_month_start_date = date('Y-m-d 00:00:00', strtotime($current_month_finish_date . "-30 days")); + $current_month_start_date = date('Y年m月d日 H时i分', strtotime($current_month_finish_date . "-30 days")); $result = array(); $result['current_month_start_date'] = $current_month_start_date;