puzhibing
2023-05-18 53562814add61acfdc02d6b25dae6324f6fd5f92
DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/OrderController.java
@@ -705,13 +705,38 @@
            @ApiImplicitParam(value = "订单id", name = "orderId", required = true, dataType = "int"),
            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
    })
    public ResultUtil sendVerificationCode(Integer orderId){
    public ResultUtil sendVerificationCode(Integer orderId, Integer language){
        try {
            orderLogisticsService.sendVerificationCode(orderId);
            orderLogisticsService.sendVerificationCode(orderId, language);
            return ResultUtil.success();
        }catch (Exception e){
            e.printStackTrace();
            return ResultUtil.runErr();
        }
    }
    @ResponseBody
    @PostMapping("/api/order/payOrder")
    @ApiOperation(value = "司机订单代付(现金收款)", tags = {"司机端-服务中"}, notes = "")
    @ApiImplicitParams({
            @ApiImplicitParam(value = "订单id", name = "orderId", required = true, dataType = "int"),
            @ApiImplicitParam(value = "订单类型", name = "orderType", required = true, dataType = "int"),
            @ApiImplicitParam(value = "支付方式(1=线上,2=余额)", name = "payType", required = true, dataType = "int"),
            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....")
    })
    public ResultUtil payOrder(Integer orderId, Integer orderType, Integer payType, Integer language, HttpServletRequest request){
        try {
            Integer uid = driverService.getUserIdFormRedis(request);
            if(null == uid){
                return ResultUtil.tokenErr();
            }
            return orderService.payOrder(uid, orderId, orderType, payType, language);
        }catch (Exception e){
            e.printStackTrace();
            return ResultUtil.runErr();
        }
    }
}