...
|
...
|
@@ -1883,14 +1883,15 @@ class Car extends Base |
|
|
* @return void
|
|
|
*/
|
|
|
public function countrebook(){
|
|
|
$id = $this->request->param("order_id");
|
|
|
$reservation_time = $this->request->param("reservation_time");//预约时间
|
|
|
$id = $this->request->param("order_id","507");
|
|
|
$reservation_time = $this->request->param("reservation_time","2024-09-10 18:00-18:30");//预约时间
|
|
|
$order = Db::name("order")->where("id", $id)->find();
|
|
|
$departure_time=substr($reservation_time,0,16);
|
|
|
$refund_time=substr($order['reservation_time'],0,16);
|
|
|
//下单五分钟后五收取手续费
|
|
|
$create_time=$order['create_time'];
|
|
|
$newtime=time()-$create_time;
|
|
|
|
|
|
try {
|
|
|
if($newtime<300){
|
|
|
// print_r([$create_time,$newtime]);
|
...
|
...
|
@@ -1905,6 +1906,7 @@ class Car extends Base |
|
|
if($newrefund_time<3600){
|
|
|
$pay_fee = $order['price'];
|
|
|
$rebook_fee = 0;
|
|
|
$this->error("出发前一小时无法改签");
|
|
|
}else if($newrefund_time>3600 & $newrefund_time<7200){
|
|
|
$pay_fee = bcmul($order['price'],0.2,2);
|
|
|
$rebook_fee = $pay_fee;
|
...
|
...
|
@@ -1952,7 +1954,7 @@ class Car extends Base |
|
|
->update([
|
|
|
"commission_price"=>$rebook_fee,
|
|
|
"rebook"=>1,
|
|
|
"order_no" => getOrderSn(),
|
|
|
"rebook_no" => getOrderSn(),
|
|
|
"create_time"=>time()
|
|
|
]);
|
|
|
}
|
...
|
...
|
|