| | |
| | | @ApiImplicitParam(value = "订单类型(1=专车,4=小件物流-同城)", name = "orderType", required = true, dataType = "int"), |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil grabOrder(Integer orderId, Integer orderType, HttpServletRequest request){ |
| | | public ResultUtil grabOrder(Integer orderId, Integer orderType, Integer language, HttpServletRequest request){ |
| | | try { |
| | | Integer uid = driverService.getUserIdFormRedis(request); |
| | | if(null == uid){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | return orderService.grabOrder(orderId, orderType, uid); |
| | | return orderService.grabOrder(orderId, orderType, uid, language); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | |
| | | @ApiImplicitParam(value = "备注", name = "remark", required = false, dataType = "string"), |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil reassign(Reassign reassign, HttpServletRequest request){ |
| | | public ResultUtil reassign(Reassign reassign, Integer language, HttpServletRequest request){ |
| | | try { |
| | | Integer uid = driverService.getUserIdFormRedis(request); |
| | | if(null == uid){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | return reassignService.saveData(reassign, uid, null); |
| | | return reassignService.saveData(reassign, uid, null, language); |
| | | }catch (SystemException s){ |
| | | return ResultUtil.error(s.getMsg()); |
| | | } catch (Exception e){ |
| | |
| | | @ApiImplicitParam(value = "当前纬度", name = "lat", required = true, dataType = "double"), |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil process(Integer orderId, Integer orderType, Integer state, Double lon, Double lat,String phone, HttpServletRequest request){ |
| | | public ResultUtil process(Integer orderId, Integer orderType, Integer state, Double lon, Double lat,String phone, Integer language, HttpServletRequest request){ |
| | | try { |
| | | Integer uid = driverService.getUserIdFormRedis(request); |
| | | if(null == uid){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | return orderService.process(orderId, orderType, state, uid, lon, lat,phone); |
| | | return orderService.process(orderId, orderType, state, uid, lon, lat, phone, language); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | |
| | | @ApiImplicitParam(value = "改派原因", name = "reason", required = true, dataType = "string"), |
| | | @ApiImplicitParam(value = "备注", name = "remark", required = false, dataType = "string"), |
| | | }) |
| | | public String reassign_(Reassign reassign, Integer uid){ |
| | | public String reassign_(Reassign reassign, Integer uid, Integer language){ |
| | | try { |
| | | ResultUtil resultUtil = reassignService.saveData(reassign, uid, 3); |
| | | ResultUtil resultUtil = reassignService.saveData(reassign, uid, 3, language); |
| | | return JSON.toJSONString(resultUtil); |
| | | }catch (SystemException s){ |
| | | return JSON.toJSONString(ResultUtil.error(s.getMsg())); |
| | |
| | | @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 completeOrder(Integer orderId, Integer orderType){ |
| | | public ResultUtil completeOrder(Integer orderId, Integer orderType, Integer language){ |
| | | try { |
| | | return orderService.completeOrder(orderId, orderType); |
| | | return orderService.completeOrder(orderId, orderType, language); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | |
| | | @ApiImplicitParam(value = "取件码", name = "pickUpCode", required = true, dataType = "string"), |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil fillInPickUpCode(Integer orderId, String pickUpCode){ |
| | | public ResultUtil fillInPickUpCode(Integer orderId, String pickUpCode, Integer language){ |
| | | try { |
| | | return orderLogisticsService.fillInPickUpCode(orderId, pickUpCode); |
| | | return orderLogisticsService.fillInPickUpCode(orderId, pickUpCode, language); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | |
| | | @ApiImplicitParam(value = "差价金额", name = "difference", required = true, dataType = "double"), |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil makeUpTheDifference(Integer orderId, Double difference){ |
| | | public ResultUtil makeUpTheDifference(Integer orderId, Double difference, Integer language){ |
| | | try { |
| | | return orderLogisticsService.makeUpTheDifference(orderId, difference); |
| | | return orderLogisticsService.makeUpTheDifference(orderId, difference, language); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | |
| | | @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(); |
| | | } |
| | | } |
| | | } |