...
|
...
|
@@ -881,7 +881,7 @@ class Car extends Base |
|
|
*/
|
|
|
public function createintercityorder(){
|
|
|
$route_id = $this->request->param("route_id");//线路
|
|
|
$is_qrcode = $this->request->param("is_qrcode");//乘车人数
|
|
|
$is_qrcode = $this->request->param("is_qrcode");//二维码下单:0=不是,1=是
|
|
|
$number = $this->request->param("number");//乘车人数
|
|
|
$reservation_time = $this->request->param("reservation_time");//预约时间
|
|
|
$phone = $this->request->param("phone");//联系电话
|
...
|
...
|
@@ -943,4 +943,32 @@ class Car extends Base |
|
|
$this->success("请求成功",$carmodel);
|
|
|
}
|
|
|
|
|
|
public function selectintercityorder(){
|
|
|
$page=$this->request->param("page");
|
|
|
$total=$this->request->param("total");
|
|
|
$start_time=$this->request->param("start_time");
|
|
|
$end_time=$this->request->param("end_time");
|
|
|
$driver=Db::name("driver")->where('user_id',$this->auth->id)->find();
|
|
|
$res=Db::name("order")
|
|
|
->alias("a")
|
|
|
->join("route b","a.route_id=b.id")
|
|
|
->field("a.*,b.start_address,b.end_address")
|
|
|
->where("driver_id",$driver["id"])
|
|
|
->where("is_qrcode",1)
|
|
|
->where("create_time",">",$start_time)
|
|
|
->where("create_time","<",$end_time)
|
|
|
->page($page,$total)
|
|
|
->select();
|
|
|
$amount=Db::name("order")
|
|
|
->alias("a")
|
|
|
->join("route b","a.route_id=b.id")
|
|
|
->field("a.*,b.start_address,b.end_address")
|
|
|
->where("driver_id",$driver["id"])
|
|
|
->where("is_qrcode",1)
|
|
|
->where("create_time",">",$start_time)
|
|
|
->where("create_time","<",$end_time)
|
|
|
->count();
|
|
|
$data=["data"=>$res,"amount"=>$amount];
|
|
|
return $this->success("请求成功",$data);
|
|
|
}
|
|
|
} |
|
|
\ No newline at end of file |
...
|
...
|
|