|
@@ -180,7 +180,8 @@ class Taxi extends ApiController
|
|
|
// 验证是否有未支付订单,有则直接更新订单为新订单
|
|
// 验证是否有未支付订单,有则直接更新订单为新订单
|
|
|
$hasOrderId = model('common/TaxiOrder')->where(['user_id'=> $user['id'],'status'=> 1])->order('created_at','desc')->value('id');
|
|
$hasOrderId = model('common/TaxiOrder')->where(['user_id'=> $user['id'],'status'=> 1])->order('created_at','desc')->value('id');
|
|
|
if($hasOrderId){
|
|
if($hasOrderId){
|
|
|
- $order = model('common/TaxiOrder')->where(['id'=> $hasOrderId])->update($params);
|
|
|
|
|
|
|
+ model('common/TaxiOrder')->where(['id'=> $hasOrderId])->update($params);
|
|
|
|
|
+ $order = model('common/TaxiOrder')->where(['id'=> $hasOrderId])->findOrFail();
|
|
|
}else{
|
|
}else{
|
|
|
$order = model('common/TaxiOrder')::create($params,true);
|
|
$order = model('common/TaxiOrder')::create($params,true);
|
|
|
}
|
|
}
|