| | |
| | | @ApiOperation(value = "用户订单匹配列表页面,用户订单去匹配司机的行程", httpMethod = "POST") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "orderId", value = "订单id", dataType = "int"), |
| | | @ApiImplicitParam(name = "type", value = "1默认排序(根据线路、时间,人数综合匹配排序721),2时间最早,3距离最近", dataType = "int"), |
| | | @ApiImplicitParam(name = "lon", value = "经度", dataType = "double"), |
| | | @ApiImplicitParam(name = "lat", value = "纬度", dataType = "double"), |
| | | @ApiImplicitParam(name = "type", value = "1默认排序(根据线路、时间,人数综合匹配排序721),2时间最早,3距离最近", dataType = "int") |
| | | }) |
| | | public Object userMatchingOrderList(Integer orderId,Integer current,Integer size,Integer type,Double lon,Double lat){ |
| | | public Object userMatchingOrderList(Integer orderId,Integer current,Integer size,Integer type){ |
| | | try { |
| | | if(ToolUtil.isEmpty(orderId)){ |
| | | return ResultUtil.paranErr("orderId不能为空"); |
| | | } |
| | | if(ToolUtil.isEmpty(type)){ |
| | | return ResultUtil.paranErr("type不能为空"); |
| | | } |
| | | if(ToolUtil.isEmpty(lon)){ |
| | | return ResultUtil.paranErr("lon不能为空"); |
| | | } |
| | | if(ToolUtil.isEmpty(lat)){ |
| | | return ResultUtil.paranErr("lat不能为空"); |
| | | } |
| | | OrderRide orderRide=orderRideService.selectById(orderId); |
| | | current=current==null?1:current; |
| | |
| | | OrderRideVo orderRideVo=new OrderRideVo(); |
| | | orderRideVo.setCurrent(current); |
| | | orderRideVo.setSize(size); |
| | | orderRideVo.setLon(lon); |
| | | orderRideVo.setLat(lat); |
| | | orderRideVo.setLon(orderRide.getStartLon()); |
| | | orderRideVo.setLat(orderRide.getStartLat()); |
| | | orderRideVo.setNum(orderRide.getNum()); |
| | | orderRideVo.setType(type+1);//搜索条件:1默认排序(根据线路、时间,人数综合匹配排序721),2时间最早,3距离最近 |
| | | List<OrderRideVo> orderRides=orderTravelService.getOrderTravel(orderRideVo); |
| | |
| | | @ApiOperation(value = "司机订单匹配列表页面(司机的订单去匹配乘客订单)", httpMethod = "POST") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "orderId", value = "订单id", dataType = "int"), |
| | | @ApiImplicitParam(name = "type", value = "1默认排序(根据线路、时间,人数综合匹配排序721),2时间最早,3距离最近,4价格最低", dataType = "int"), |
| | | @ApiImplicitParam(name = "lon", value = "经度", dataType = "double"), |
| | | @ApiImplicitParam(name = "lat", value = "纬度", dataType = "double"), |
| | | @ApiImplicitParam(name = "type", value = "1默认排序(根据线路、时间,人数综合匹配排序721),2时间最早,3距离最近,4价格最低", dataType = "int") |
| | | }) |
| | | public Object driverMatchingOrderList(Integer orderId,Integer current,Integer size,Integer type,Double lon,Double lat){ |
| | | public Object driverMatchingOrderList(Integer orderId,Integer current,Integer size,Integer type){ |
| | | try { |
| | | try { |
| | | if(ToolUtil.isEmpty(orderId)){ |
| | |
| | | } |
| | | if(ToolUtil.isEmpty(type)){ |
| | | return ResultUtil.paranErr("type不能为空"); |
| | | } |
| | | if(ToolUtil.isEmpty(lon)){ |
| | | return ResultUtil.paranErr("lon不能为空"); |
| | | } |
| | | if(ToolUtil.isEmpty(lat)){ |
| | | return ResultUtil.paranErr("lat不能为空"); |
| | | } |
| | | OrderTravel orderTravel=orderTravelService.selectById(orderId); |
| | | current=current==null?1:current; |
| | |
| | | orderRideVo.setCurrent(current); |
| | | orderRideVo.setSize(size); |
| | | orderRideVo.setNum(orderTravel.getNum()); |
| | | orderRideVo.setLon(lon); |
| | | orderRideVo.setLat(lat); |
| | | orderRideVo.setLon(orderTravel.getStartLon()); |
| | | orderRideVo.setLat(orderTravel.getStartLat()); |
| | | orderRideVo.setType(type+1);//搜索条件:1默认排序(根据线路、时间,人数综合匹配排序721),2时间最早,3距离最近,4价格最低 |
| | | List<OrderRideVo> orderRides=orderRideService.getOrderRide(orderRideVo); |
| | | return ResultUtil.success(orderRides); |