| | |
| | | @ApiImplicitParam(value = "订单类型(1=专车,2=跨城)", name = "orderType", required = true, dataType = "int"), |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil cancelOrder(Integer orderId, Integer orderType){ |
| | | public ResultUtil cancelOrder(Integer orderId, Integer orderType, HttpServletRequest request){ |
| | | try { |
| | | Integer uid = dispatchService.getUserIdFormRedis(request); |
| | | if(null == uid){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | if(orderType == 1){//专车 |
| | | return orderPrivateCarService.cancelOrder(orderId); |
| | | } |
| | | if(orderType == 2){//跨城 |
| | | return orderCrossCityService.cancelOrder(orderId); |
| | | return orderCrossCityService.cancelOrder(orderId, uid); |
| | | } |
| | | return ResultUtil.success(); |
| | | }catch (Exception e){ |
| | |
| | | @ApiImplicitParam(value = "订单类型(1=专车,2=出租车,3=跨城)", name = "orderType", required = true, dataType = "int"), |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil cancelOrder1(Integer orderId, Integer orderType){ |
| | | public ResultUtil cancelOrder1(Integer orderId, Integer orderType, HttpServletRequest request){ |
| | | try { |
| | | Integer uid = dispatchService.getUserIdFormRedis(request); |
| | | if(null == uid){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | if(orderType == 1){//专车 |
| | | return orderPrivateCarService.cancelOrder(orderId); |
| | | } |
| | |
| | | return orderTaxiService.cancelOrder(orderId); |
| | | } |
| | | if(orderType == 3){//跨城 |
| | | return orderCrossCityService.cancelOrder(orderId); |
| | | return orderCrossCityService.cancelOrder(orderId, uid); |
| | | } |
| | | return ResultUtil.success(); |
| | | }catch (Exception e){ |