| | |
| | | @Autowired |
| | | private IOrderCrossCityService orderCrossCityService; |
| | | |
| | | /*@Autowired |
| | | private ICBCPayUtil icbcPayUtil;*/ |
| | | |
| | | @Autowired |
| | | private IOrderLogisticsService orderLogisticsService; |
| | | |
| | |
| | | map.put("driverPhone", map.get("telX")); |
| | | } |
| | | OrderInfoWarpper orderInfoWarpper = OrderInfoWarpper.getOrderInfoWarpper(map); |
| | | String driverName = orderInfoWarpper.getDriverName(); |
| | | if(language == 2){ |
| | | driverName = "Master " + driverName.replace("师傅", ""); |
| | | } |
| | | if(language == 3){ |
| | | driverName = "Maître " + driverName.replace("师傅", ""); |
| | | } |
| | | orderInfoWarpper.setDriverName(driverName); |
| | | // String driverName = orderInfoWarpper.getDriverName(); |
| | | // if(language == 2){ |
| | | // driverName = "Master " + driverName.replace("师傅", ""); |
| | | // } |
| | | // if(language == 3){ |
| | | // driverName = "Maître " + driverName.replace("师傅", ""); |
| | | // } |
| | | // orderInfoWarpper.setDriverName(driverName); |
| | | |
| | | File file = new File(filePath + orderId + "_1.txt"); |
| | | if(file.exists()){ |
| | |
| | | map.put("driverPhone", map.get("telX")); |
| | | } |
| | | OrderInfoWarpper orderInfoWarpper = OrderInfoWarpper.getOrderInfoWarpper(map); |
| | | String driverName = orderInfoWarpper.getDriverName(); |
| | | if(language == 2){ |
| | | driverName = "Master " + driverName.replace("师傅", ""); |
| | | } |
| | | if(language == 3){ |
| | | driverName = "Maître " + driverName.replace("师傅", ""); |
| | | } |
| | | orderInfoWarpper.setDriverName(driverName); |
| | | // String driverName = orderInfoWarpper.getDriverName(); |
| | | // if(language == 2){ |
| | | // driverName = "Master " + driverName.replace("师傅", ""); |
| | | // } |
| | | // if(language == 3){ |
| | | // driverName = "Maître " + driverName.replace("师傅", ""); |
| | | // } |
| | | // orderInfoWarpper.setDriverName(driverName); |
| | | return ResultUtil.success(orderInfoWarpper); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | |
| | | @ApiOperation(value = "获取订单取消支付页面详情", tags = {"用户端-服务中"}, notes = "") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "订单id", name = "orderId", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "订单类型(1=专车,2=出租车,3=城际)", name = "orderType", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "订单类型(1=专车,2=出租车,3=城际,4=同城小件物流)", name = "orderType", required = true, dataType = "int"), |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil<OrderInfoWarpper> queryCancelPage(Integer orderId, Integer orderType, Integer language){ |
| | |
| | | ResultUtil<BaseWarpper> r = orderCrossCityService.queryCancleAmount(orderId); |
| | | map.put("cancelPayMoney", r.getData().getAmount()); |
| | | break; |
| | | case 4://同城小件物流 |
| | | map = orderLogisticsService.queryOrderInfo(language, orderId); |
| | | ResultUtil<BaseWarpper> r1 = orderLogisticsService.queryCancleAmount(orderId, language); |
| | | map.put("cancelPayMoney", r1.getData().getAmount()); |
| | | break; |
| | | } |
| | | OrderInfoWarpper orderInfoWarpper = OrderInfoWarpper.getOrderInfoWarpper(map); |
| | | String driverName = orderInfoWarpper.getDriverName(); |
| | | if(language == 2){ |
| | | driverName = "Master " + driverName.replace("师傅", ""); |
| | | } |
| | | if(language == 3){ |
| | | driverName = "Maître " + driverName.replace("师傅", ""); |
| | | } |
| | | orderInfoWarpper.setDriverName(driverName); |
| | | return ResultUtil.success(orderInfoWarpper); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | |
| | | @ApiOperation(value = "获取取消订单需要支付的费用金额", tags = {"用户端-出租车", "用户端-专车"}, notes = "返回金额为0则不需要支付") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "订单id", name = "id", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "订单类型(1=专车,2=出租车,3=跨城)", name = "orderType", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "订单类型(1=专车,2=出租车,3=跨城, 4=同城小件物流)", name = "orderType", required = true, dataType = "int"), |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil<BaseWarpper> queryCancleAmount(Integer id, Integer orderType, Integer language){ |
| | |
| | | return orderTaxiService.queryCancleAmount(id); |
| | | case 3: |
| | | return orderCrossCityService.queryCancleAmount(id); |
| | | case 4: |
| | | return orderLogisticsService.queryCancleAmount(id, language); |
| | | } |
| | | return ResultUtil.success(); |
| | | }catch (Exception e){ |
| | |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/api/taxi/addCancle") |
| | | @ApiOperation(value = "添加取消记录", tags = {"用户端-出租车", "用户端-专车", "用户端-跨城"}, notes = "") |
| | | @ApiOperation(value = "添加取消记录【2.0】", tags = {"用户端-出租车", "用户端-专车", "用户端-跨城"}, notes = "") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "订单id", name = "id", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "订单类型(1=专车,2=出租车,3=跨城)", name = "orderType", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "取消原因", name = "reason", required = true, dataType = "string"), |
| | | @ApiImplicitParam(value = "当前经度", name = "lon", required = true, dataType = "Double"), |
| | | @ApiImplicitParam(value = "当前纬度", name = "lat", required = true, dataType = "Double"), |
| | | @ApiImplicitParam(value = "详细地址", name = "address", required = true, dataType = "string"), |
| | | @ApiImplicitParam(value = "备注", name = "remark", required = false, dataType = "string"), |
| | | @ApiImplicitParam(value = "语言类型(1=简体中文,2=英语,3=法语)", name = "language", required = false, dataType = "int"), |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil addCancle(Integer id, Integer orderType, String reason, String remark, Integer language, HttpServletRequest request){ |
| | | public ResultUtil addCancle(Integer id, Integer orderType, String reason, String remark, Double lon, Double lat, String address, Integer language, HttpServletRequest request){ |
| | | try { |
| | | Integer uid = userInfoService.getUserIdFormRedis(request); |
| | | if(null == uid){ |
| | |
| | | } |
| | | switch (orderType){ |
| | | case 1: |
| | | return orderPrivateCarService.addCancle(id, reason, remark, uid, language); |
| | | return orderPrivateCarService.addCancle(id, reason, remark, uid, lon, lat, address, language); |
| | | // case 2: |
| | | // return orderTaxiService.addCancle(id, reason, remark, uid); |
| | | // case 3: |
| | | // return orderCrossCityService.addCancle(id, reason, remark, uid); |
| | | case 4: |
| | | return orderLogisticsService.addCancle(id, reason, remark, uid, language); |
| | | return orderLogisticsService.addCancle(id, reason, remark, uid, lon, lat, address, language); |
| | | // case 5: |
| | | // return orderLogisticsService.addCancle(id, reason, remark, uid); |
| | | // case 6: |
| | |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/api/taxi/cancleOrderTaxi") |
| | | @ApiOperation(value = "取消操作支付【1.1】", tags = {"用户端-出租车", "用户端-专车", "用户端-跨城"}, notes = "") |
| | | @ApiOperation(value = "取消操作支付【1.1】", tags = {"用户端-出租车", "用户端-专车", "用户端-跨城", "用户端-小件物流"}, notes = "") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "订单id", name = "id", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "订单类型(1=专车,2=出租车,3=跨城)", name = "orderType", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "订单类型(1=专车,2=出租车,3=跨城,4=同城小件物流)", name = "orderType", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "支付方式(1=手机支付,2=银行卡支付,3=余额)", name = "payType", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "银行卡id", name = "bankCardId", required = false, dataType = "int"), |
| | | @ApiImplicitParam(value = "取消单id(取消操作返回)", name = "cancleId", required = false, dataType = "int"), |
| | |
| | | // return orderTaxiService.cancleOrderTaxi(id, payType, cancleId, type); |
| | | // case 3: |
| | | // return orderCrossCityService.cancleOrderCrossCity(id, payType, cancleId, type); |
| | | case 4: |
| | | return orderLogisticsService.cancleOrderPrivateCar(id, payType, bankCardId, cancleId, type, language); |
| | | } |
| | | return ResultUtil.success(); |
| | | }catch (Exception e){ |
| | |
| | | // case 3: |
| | | // orderCrossCityService.payCancelOrderCrossCity(id, order_id, 1); |
| | | // break; |
| | | case 4: |
| | | orderLogisticsService.payCancelOrderPrivateCar(id, order_id, language); |
| | | break; |
| | | } |
| | | callbackResponse.setCheckout_request_id(order_id); |
| | | callbackResponse.setMerchant_transaction_id(out_trade_no); |
| | |
| | | payoutCallbackResponse.setResults(results); |
| | | return payoutCallbackResponse; |
| | | } |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/api/taxi/updateEndAddress") |
| | | @ApiOperation(value = "修改目的地【2.0】", tags = {"用户端-专车", "用户端-小件物流"}, notes = "") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "订单id", name = "orderId", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "订单类型", name = "orderType", 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(value = "语言", name = "language", required = true, dataType = "int"), |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil updateEndAddress(Integer orderId, Integer orderType, String endLon, String endLat, String endAddress){ |
| | | switch (orderType){ |
| | | case 1: |
| | | orderPrivateCarService.updateEndAddress(orderId, endLon, endLat, endAddress); |
| | | break; |
| | | case 4: |
| | | orderLogisticsService.updateEndAddress(orderId, endLon, endLat, endAddress); |
| | | break; |
| | | } |
| | | return ResultUtil.success(); |
| | | } |
| | | } |