Browse Source

fixed:用户端-初始化订单(添加技师可服务时间段)

刘学玺 4 months ago
parent
commit
e4030ae3dc
1 changed files with 5 additions and 0 deletions
  1. 5 0
      app/Services/Client/OrderService.php

+ 5 - 0
app/Services/Client/OrderService.php

@@ -79,6 +79,10 @@ class OrderService
 
                 // 查询技师数据
                 $coach = $this->validateCoach($data['coach_id']);
+
+                // 查询技师可服务时间段
+                $availableTimeSlots = app(CoachService::class)->getSchedule($coach->id);
+
                 // 获取项目详情
                 $project = $this->projectService->getProjectDetail($data['project_id'], $areaCode);
                 abort_if(! $project, 400, '项目不存在');
@@ -101,6 +105,7 @@ class OrderService
                     'project' => $project,
                     'address' => $address,
                     'amounts' => $amounts,
+                    'availableTimeSlots' => $availableTimeSlots,
                 ];
             });
         } catch (Exception $e) {