From 76368e3f45acaf795f6f0faf56044c786341f726 Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期六, 11 二月 2023 19:06:26 +0800 Subject: [PATCH] 更新代码 --- DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/OrderController.java | 29 +++++++++++++++++++++++++++-- 1 files changed, 27 insertions(+), 2 deletions(-) diff --git a/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/OrderController.java b/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/OrderController.java index e670dbc..c59bf5a 100644 --- a/DriverIGOTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/api/OrderController.java +++ b/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(); + } + } } -- Gitblit v1.7.1