正在显示
1 个修改的文件
包含
7 行增加
和
11 行删除
@@ -1811,8 +1811,8 @@ class Car extends Base | @@ -1811,8 +1811,8 @@ class Car extends Base | ||
1811 | * @return void | 1811 | * @return void |
1812 | */ | 1812 | */ |
1813 | public function rebook(){ | 1813 | public function rebook(){ |
1814 | - $id = $this->request->param("order_id","507"); | ||
1815 | - $reservation_time = $this->request->param("reservation_time","2024-09-10 18:00-18:30");//预约时间 | 1814 | + $id = $this->request->param("order_id"); |
1815 | + $reservation_time = $this->request->param("reservation_time");//预约时间 | ||
1816 | $order = Db::name("order")->where("id", $id)->find(); | 1816 | $order = Db::name("order")->where("id", $id)->find(); |
1817 | $departure_time=substr($reservation_time,0,16); | 1817 | $departure_time=substr($reservation_time,0,16); |
1818 | $refund_time=substr($order['reservation_time'],0,16); | 1818 | $refund_time=substr($order['reservation_time'],0,16); |
@@ -1827,8 +1827,7 @@ class Car extends Base | @@ -1827,8 +1827,7 @@ class Car extends Base | ||
1827 | "commission_price"=>$rebook_fee, | 1827 | "commission_price"=>$rebook_fee, |
1828 | "rebook"=>1, | 1828 | "rebook"=>1, |
1829 | "reservation_time" => $reservation_time, | 1829 | "reservation_time" => $reservation_time, |
1830 | - "order_no" => getOrderSn(), | ||
1831 | - "create_time"=>time() | 1830 | + "order_no" => getOrderSn() |
1832 | ]); | 1831 | ]); |
1833 | $data=[ | 1832 | $data=[ |
1834 | "pay"=>'', | 1833 | "pay"=>'', |
@@ -1849,8 +1848,7 @@ class Car extends Base | @@ -1849,8 +1848,7 @@ class Car extends Base | ||
1849 | ->update([ | 1848 | ->update([ |
1850 | "commission_price"=>$rebook_fee, | 1849 | "commission_price"=>$rebook_fee, |
1851 | "rebook"=>1, | 1850 | "rebook"=>1, |
1852 | - "order_no" => getOrderSn(), | ||
1853 | - "create_time"=>time() | 1851 | + "order_no" => getOrderSn() |
1854 | ]); | 1852 | ]); |
1855 | $data=[ | 1853 | $data=[ |
1856 | "pay"=>'', | 1854 | "pay"=>'', |
@@ -1864,8 +1862,7 @@ class Car extends Base | @@ -1864,8 +1862,7 @@ class Car extends Base | ||
1864 | "commission_price"=>$rebook_fee, | 1862 | "commission_price"=>$rebook_fee, |
1865 | "rebook"=>1, | 1863 | "rebook"=>1, |
1866 | "reservation_time" => $reservation_time, | 1864 | "reservation_time" => $reservation_time, |
1867 | - "order_no" => getOrderSn(), | ||
1868 | - "create_time"=>time() | 1865 | + "order_no" => getOrderSn() |
1869 | ]); | 1866 | ]); |
1870 | $data=[ | 1867 | $data=[ |
1871 | "pay"=>'', | 1868 | "pay"=>'', |
@@ -1883,15 +1880,14 @@ class Car extends Base | @@ -1883,15 +1880,14 @@ class Car extends Base | ||
1883 | * @return void | 1880 | * @return void |
1884 | */ | 1881 | */ |
1885 | public function countrebook(){ | 1882 | public function countrebook(){ |
1886 | - $id = $this->request->param("order_id","507"); | ||
1887 | - $reservation_time = $this->request->param("reservation_time","2024-09-10 18:00-18:30");//预约时间 | 1883 | + $id = $this->request->param("order_id"); |
1884 | + $reservation_time = $this->request->param("reservation_time");//预约时间 | ||
1888 | $order = Db::name("order")->where("id", $id)->find(); | 1885 | $order = Db::name("order")->where("id", $id)->find(); |
1889 | $departure_time=substr($reservation_time,0,16); | 1886 | $departure_time=substr($reservation_time,0,16); |
1890 | $refund_time=substr($order['reservation_time'],0,16); | 1887 | $refund_time=substr($order['reservation_time'],0,16); |
1891 | //下单五分钟后五收取手续费 | 1888 | //下单五分钟后五收取手续费 |
1892 | $create_time=$order['create_time']; | 1889 | $create_time=$order['create_time']; |
1893 | $newtime=time()-$create_time; | 1890 | $newtime=time()-$create_time; |
1894 | - | ||
1895 | try { | 1891 | try { |
1896 | if($newtime<300){ | 1892 | if($newtime<300){ |
1897 | // print_r([$create_time,$newtime]); | 1893 | // print_r([$create_time,$newtime]); |
-
请 注册 或 登录 后发表评论