From 9c48a1fb916fa9f5f24a2083416db484ec7786a9 Mon Sep 17 00:00:00 2001 From: wanghongjun <1445693971@qq.com> Date: Tue, 16 Jun 2026 10:12:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E5=88=97=E8=A1=A8=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Services/EventCalendarService.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Services/EventCalendarService.php b/app/Services/EventCalendarService.php index 746fb83..bbba294 100644 --- a/app/Services/EventCalendarService.php +++ b/app/Services/EventCalendarService.php @@ -308,7 +308,10 @@ class EventCalendarService extends BaseService $pattern_id = EventCalendar::query()->where('status', 1)->value('pattern_id'); $columns = ['id as pattern_id', 'name as model_name']; if ($pattern_id) { - $data = ParkingPattern::query()->find($pattern_id, $columns)->toArray(); + $data = ParkingPattern::query()->find($pattern_id, $columns); + if (!$data) { + $data = ParkingPattern::query()->where('is_default', 1)->first($columns); + } } else { $data = ParkingPattern::query()->where('is_default', 1)->first($columns); }