Browse Source

完善功能

gorden 10 months ago
parent
commit
bdd4edd209
1 changed files with 3 additions and 3 deletions
  1. 3 3
      app/admin/service/order/AppointmentService.php

+ 3 - 3
app/admin/service/order/AppointmentService.php

@@ -302,12 +302,12 @@ class AppointmentService
 
     public static function update(Request $request)
     {
-        $appointmentId = $request->post('appointment_id');
+        $params = $request->post();
+        $appointmentId = $params['appointment_id'];
         $appointment = Appointment::where('appointment_id', $appointmentId)->first();
-        if (!$appointment) {
+        if (empty($appointment)) {
             return json_fail("数据不存在");
         }
-        $params = $request->post();
         Db::beginTransaction();
         try {
             // 先检查选择的时段是否可预约