|
|
@@ -261,6 +261,37 @@ class Taxi extends ApiController
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * 当前进行中订单详情
|
|
|
+ *
|
|
|
+ * @author 许祖兴 < zuxing.xu@lettered.cn>
|
|
|
+ * @date 2020/7/6 11:09
|
|
|
+ *
|
|
|
+ * @return \think\response\Json
|
|
|
+ * @throws \Lettered\Support\Exceptions\FailedException
|
|
|
+ * @throws \think\db\exception\DataNotFoundException
|
|
|
+ * @throws \think\db\exception\ModelNotFoundException
|
|
|
+ * @throws \think\exception\DbException
|
|
|
+ */
|
|
|
+ public function newOrder()
|
|
|
+ {
|
|
|
+ $param = $this->request->param();
|
|
|
+ // 数据校验
|
|
|
+ $valid = $this->validate($param, [
|
|
|
+ 'order_id' => 'require',
|
|
|
+ ]);
|
|
|
+ // 错误
|
|
|
+ if (true !== $valid) {
|
|
|
+ return $this->ApiJson(-1, $valid);
|
|
|
+ }
|
|
|
+
|
|
|
+ $info = model('common/TaxiOrder')->with(['paylog','user','taxi','taxiUser'])
|
|
|
+ ->where(['user_id' => $this->auth->user()['id']])
|
|
|
+ ->whereIn('status',[])
|
|
|
+ ->find();
|
|
|
+ return $this->ApiJson(0,'获取成功', $info);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* 订单
|
|
|
*
|
|
|
* @author 许祖兴 < zuxing.xu@lettered.cn>
|