소스 검색

预约时间提交

WHITEFANG 1 년 전
부모
커밋
2c0188e5f2
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      app/api/logic/ServiceOrderLogic.php

+ 2 - 1
app/api/logic/ServiceOrderLogic.php

@@ -793,7 +793,6 @@ class ServiceOrderLogic extends BaseLogic
             if($work->isEmpty()){
                 throw new Exception('工单不存在');
             }
-            $work->appointment_time = strtotime($params['appointment_time']);
 
             //更新工单未确认上门的状态
             $work->work_status = 3;
@@ -804,6 +803,8 @@ class ServiceOrderLogic extends BaseLogic
                 'last_appointment_time'=>$work->appointment_time,
                 'this_appointment_time'=>strtotime($params['appointment_time']),
             ]);
+
+            $work->appointment_time = strtotime($params['appointment_time']);
             $work->save();
             Db::commit();
         }