소스 검색

vue_admin_action

Panda 3 달 전
부모
커밋
48154420b0
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      application/api/controller/Hotel.php

+ 1 - 1
application/api/controller/Hotel.php

@@ -243,7 +243,7 @@ class Hotel extends Api
         if (!$order){
             return $this->error('订单不存在或已取消');
         }
-        if (date('Y-m-d H:i:s') > ($order['start_date'] . ' 12:00:00')){
+        if (time() > strtotime($order['start_date'] . ' 12:00:00')){
             return $this->error('订单已入住,无法取消');
         }
         if (!HotelOrderModel::where('user_id',$user_id)->where('id',$params['order_id'])->where('status',1)->update(['status'=>0])){