|
@@ -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])){
|