| | |
| | | package com.xiaopeng.itinerary.controller; |
| | | |
| | | import com.xiaopeng.api.dto.map.RouteAndFareDto; |
| | | import com.xiaopeng.api.dto.order.OrderChangeDto; |
| | | import com.xiaopeng.api.vo.operation.RouteAndFareVo; |
| | | import com.xiaopeng.common.core.domain.R; |
| | | import com.xiaopeng.itinerary.service.ActiveOrderService; |
| | | import com.xiaopeng.itinerary.service.XpPricingService; |
| | | import com.xiaopeng.unifiedverification.interceptor.XpClientCheck; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.validation.Valid; |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | |
| | | @Api(tags = "费用管理") |
| | | public class ActiveOrderController { |
| | | |
| | | |
| | | @Resource |
| | | private ActiveOrderService activeOrderService; |
| | | @Resource |
| | | private XpPricingService xpPricingService; |
| | | |
| | | /** |
| | | * 在行程中修改目的地-获取路线和费用 |
| | | * @param routeAndFareDto |
| | | * @param request |
| | | * @return |
| | | */ |
| | | @PostMapping("/api/v1/mini-program/activeOrder/route-and-fare") |
| | | @ApiOperation(value = "导航-获取路线和费用", tags = {"小程序-获取路线和费用"}, response = RouteAndFareVo.class) |
| | | @XpClientCheck(checkToken = false, checkOtpToken = true) |
| | | public R<List<RouteAndFareVo>> getRouteAndFare(@RequestBody @Valid RouteAndFareDto routeAndFareDto, HttpServletRequest request) { |
| | | if(null == routeAndFareDto.getOrderId()){ |
| | | return R.fail("订单id不能为空"); |
| | | } |
| | | // uid已通过拦截器otp校验,可以直接使用 |
| | | String uid = request.getHeader("XP-Uid"); |
| | | return R.ok(xpPricingService.getRouteAndFare(routeAndFareDto, uid)); |
| | | } |
| | | |
| | | /** |
| | | * 行程中 修改目的地 确认按钮 |
| | | * 修改目的地, |