xp-robotaxi-common/xp-common-core/src/main/java/com/xiaopeng/common/core/exception/ServiceException.java
@@ -67,10 +67,11 @@ this.message = message; } public ServiceException(String message, Integer code) public ServiceException(String message, Integer code,String messageKey) { this.message = message; this.code = code; this.messageKey = messageKey; } public ServiceException(String message, String messageKey, Object[] args) xp-robotaxi-itinerary-boot/src/main/java/com/xiaopeng/itinerary/controller/XpPricingController.java
@@ -93,9 +93,21 @@ @PostMapping("/base/v1/mini-program/order/save") @ApiOperation(value = "保存订单", tags = {"小程序-保存订单"}) @XpClientCheck(checkToken = false, checkOtpToken = true) public R<SaveOrderVo> saveOrder(@RequestBody @Validated XpOrderDto dto, HttpServletRequest request) { public R<?> saveOrder(@RequestBody @Validated XpOrderDto dto, HttpServletRequest request) { String uid = request.getHeader("XP-Uid"); String orderId = xpPricingService.saveOrder(dto, uid); if(orderId==null){ String language = request.getHeader("language"); if(language==null){ return R.ok("站点已停止运营"); } if("1".equals( language)){ return R.ok("站点已停止运营"); } if("2".equals( language)){ return R.ok("This site has ceased operations"); } } SaveOrderVo saveOrderVo = new SaveOrderVo(); saveOrderVo.setOrderId(orderId); return R.ok(saveOrderVo); xp-robotaxi-itinerary-boot/src/main/java/com/xiaopeng/itinerary/service/impl/XpPricingServiceImpl.java
@@ -467,14 +467,15 @@ // 获取起点经纬度 XpPoint xpPoint = xpPointService.getById(dto.getStartPointId()); if(xpPoint.getOperationStatus()!=2){ throw new ServiceException("该站点已停止运营", I18nKeyConstant.NO_CURRENT_POINT); if(xpPoint ==null || xpPoint.getOperationStatus()!=2){ return null; } // 终点 XpPoint endXpPoint = xpPointService.getById(dto.getEndPointId()); if(endXpPoint.getOperationStatus()!=2){ throw new ServiceException("该站点已停止运营", I18nKeyConstant.NO_CURRENT_POINT); if(endXpPoint ==null || endXpPoint.getOperationStatus()!=2){ // throw new ServiceException("该站点已停止运营", 200,I18nKeyConstant.NO_CURRENT_POINT); return null; } // 判断点位是否在运营区域内