|
@@ -69,7 +69,7 @@ class Preorder extends Apic
|
|
|
//预约单
|
|
|
$pre_order = [];
|
|
|
if($pre_order_id > 0){
|
|
|
- $map = ['id'=>$pre_order_id,'company_id'=>$this->auth->company_id];
|
|
|
+ $map = ['id'=>$pre_order_id,'company_id'=>$this->auth->company_id,'pre_order_status'=>1];
|
|
|
$pre_order = Db::name('pre_order')->where($map)->find();
|
|
|
if(empty($pre_order)){
|
|
|
$this->error('不存在的预约单');
|
|
@@ -80,6 +80,13 @@ class Preorder extends Apic
|
|
|
$this->error('预约单用户非当前用户');
|
|
|
}
|
|
|
}
|
|
|
+ //修改状态
|
|
|
+ $update = [
|
|
|
+ 'order_time' => time(),
|
|
|
+ 'updatetime' => time(),
|
|
|
+ 'pre_order_status' => 2,
|
|
|
+ ];
|
|
|
+ Db::name('pre_order')->where('id',$pre_order_id)->update($update);
|
|
|
}
|
|
|
|
|
|
//检索car_id,没必要了
|