作者 董瑞恩
1 个管道 的构建 通过 耗费 1 秒

interface

@@ -83,7 +83,7 @@ class OrderController extends HomeBaseController{ @@ -83,7 +83,7 @@ class OrderController extends HomeBaseController{
83 ]; 83 ];
84 try{ 84 try{
85 Db::startTrans(); 85 Db::startTrans();
86 - Db::name('users')->where('id',$users_id)->update(['is_use'=>0,'order_no'=>null]); 86 + Db::name('users')->where('id',$users_id)->update(['is_use'=>0]);
87 Db::name('equipment')->where('name',$name)->update(['use'=>0]); 87 Db::name('equipment')->where('name',$name)->update(['use'=>0]);
88 Db::name('order')->where('order_no',$order['order_no'])->update($data); 88 Db::name('order')->where('order_no',$order['order_no'])->update($data);
89 }catch (\Exception $exception){ 89 }catch (\Exception $exception){
@@ -110,8 +110,10 @@ class OrderController extends HomeBaseController{ @@ -110,8 +110,10 @@ class OrderController extends HomeBaseController{
110 //去余数 110 //去余数
111 $yu=($end_time-$start_time)%86400; 111 $yu=($end_time-$start_time)%86400;
112 112
113 - $new_start_time=$end_time-$yu;  
114 - $new_end_time= $end_time; 113 + $new_start_time=$end_time-$yu;//时间戳
  114 + $new_end_time= $end_time;//时间戳
  115 +
  116 + $hours_start_time=date();
115 117
116 118
117 $stateTime=strtotime($interval['start_time']); 119 $stateTime=strtotime($interval['start_time']);
@@ -124,6 +126,9 @@ class OrderController extends HomeBaseController{ @@ -124,6 +126,9 @@ class OrderController extends HomeBaseController{
124 126
125 127
126 128
  129 +
  130 +
  131 +
127 $endTime+=86400; 132 $endTime+=86400;
128 }else{ 133 }else{
129 //不跨天 134 //不跨天