소스 검색

fixed:清理代码

刘学玺 4 달 전
부모
커밋
ed85fc4146
1개의 변경된 파일0개의 추가작업 그리고 32개의 파일을 삭제
  1. 0 32
      app/Services/Coach/OrderService.php

+ 0 - 32
app/Services/Coach/OrderService.php

@@ -1014,38 +1014,6 @@ class OrderService
         }
     }
 
-    /**
-     * 验证服务时间是否在技师可服务时间段内
-     *
-     * @param  int  $coachId  技师ID
-     * @param  string  $serviceTime  服务时间
-     */
-    public function validateServiceTime(int $coachId, string $serviceTime): bool
-    {
-        try {
-            // 获取技师可服务时间段
-            $availableTimeSlots = app(CoachService::class)->getSchedule($coachId);
-            abort_if(empty($availableTimeSlots), 400, '技师无可用时间段');
-
-            // 检测订单服务时间是否在技师可服务时间段内
-            foreach ($availableTimeSlots as $timeSlot) {
-                if ($serviceTime >= $timeSlot['start_time'] && $serviceTime <= $timeSlot['end_time']) {
-                    return true;
-                }
-            }
-
-            abort(400, '服务时间不在技师可服务时间段内');
-        } catch (\Exception $e) {
-            Log::error('验证技师服务时间失败', [
-                'coach_id' => $coachId,
-                'service_time' => $serviceTime,
-                'error' => $e->getMessage(),
-                'trace' => $e->getTraceAsString(),
-            ]);
-            throw $e;
-        }
-    }
-
     /**
      * 订单设置
      *