zhibing.pu
2024-04-19 2d3b7304911a393e73ec0dd48712f22ddfa8053a
UserIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/specialTrain/controller/OrderPrivateCarController.java
@@ -95,39 +95,4 @@
        }
    }
    /**
     * 分享成功后添加红包操作
     * @param orderId
     * @return
     */
    @ResponseBody
    @PostMapping("/api/orderPrivateCar/updateEndAddress")
    @ApiOperation(value = "修改目的地", tags = {"用户端-出租车", "用户端-专车", "用户端-跨城"}, notes = "")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "订单id", name = "orderId", required = true, dataType = "int"),
            @ApiImplicitParam(value = "终点经度", name = "endLon", required = true, dataType = "string"),
            @ApiImplicitParam(value = "终点纬度", name = "endLat", required = true, dataType = "string"),
            @ApiImplicitParam(value = "终点地址", name = "endAddress", required = true, dataType = "string"),
            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
    })
    public ResultUtil updateEndAddress(Integer orderId, String endLon, String endLat, String endAddress, HttpServletRequest request){
        try {
            Integer uid = userInfoService.getUserIdFormRedis(request);
            if(null == uid){
                return ResultUtil.tokenErr();
            }
            OrderPrivateCar orderPrivateCar = orderPrivateCarService.selectById(orderId);
            orderPrivateCar.setEndAddress(endAddress);
            orderPrivateCar.setEndLat(Double.valueOf(endLat));
            orderPrivateCar.setEndLon(Double.valueOf(endLon));
            orderPrivateCarService.updateById(orderPrivateCar);
            //推送
            pushUtil.pushOrderState(2, orderPrivateCar.getDriverId(), orderPrivateCar.getId(), 1, 15, 1);
            return ResultUtil.success();
        }catch (Exception e){
            e.printStackTrace();
            return ResultUtil.runErr();
        }
    }
}