正在显示
1 个修改的文件
包含
19 行增加
和
0 行删除
| @@ -1285,4 +1285,23 @@ class Car extends Base | @@ -1285,4 +1285,23 @@ class Car extends Base | ||
| 1285 | $specificaddress=Db::name("specificaddress")->where("route_id",$route_id)->select(); | 1285 | $specificaddress=Db::name("specificaddress")->where("route_id",$route_id)->select(); |
| 1286 | $this->success("请求成功",$specificaddress); | 1286 | $this->success("请求成功",$specificaddress); |
| 1287 | } | 1287 | } |
| 1288 | + | ||
| 1289 | + | ||
| 1290 | + /** | ||
| 1291 | + * 查询订单中选中的座位 | ||
| 1292 | + * @return void | ||
| 1293 | + */ | ||
| 1294 | + public function findseat(){ | ||
| 1295 | + $order_id=$this->request->param("order_id"); | ||
| 1296 | + $order=Db::name("name")->where("id",$order_id)->find(); | ||
| 1297 | + $car=Db::name("car")->where("id",$order['car_id'])->find(); | ||
| 1298 | + $seat=Db::name("seat")->where("id",$car['seat_id'])->find(); | ||
| 1299 | + $seat_data=json_decode($seat['seat'],true); | ||
| 1300 | + if($seat_data){ | ||
| 1301 | + $seat_info=$seat_data[$order['seat_no']]; | ||
| 1302 | + $this->success("请求成功",$seat_info); | ||
| 1303 | + }else{ | ||
| 1304 | + $this->error("请求失败"); | ||
| 1305 | + } | ||
| 1306 | + } | ||
| 1288 | } | 1307 | } |
-
请 注册 或 登录 后发表评论