xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/constant/I18nKeyConstant.java
@@ -53,4 +53,7 @@ // 路径不存在 String PATH_NOT_FOUND = "path.not.found"; // 存在进行中的订单 String HAS_UNPAID_ORDER = "has.unpaid.order"; } xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/service/impl/XpPricingServiceImpl.java
@@ -415,7 +415,6 @@ @Override public Long saveOrder(XpOrderDto dto, String uid) { // 是否在运营区域时间内 XpElectronicFenceArea xpElectronicFenceArea = xpElectronicFenceAreaMapper.selectById(dto.getXpElectronicFenceAreaId()); XpElectronicFence xpElectronicFence = xpElectronicFenceMapper.selectById(xpElectronicFenceArea.getElectronicId()); @@ -430,7 +429,7 @@ // 判断是否有进行的订单 R<Long> r = xpOrderClient.hasUnPaodOrder(uid); if (r.getData() > 0) { throw new RuntimeException("有正在进行的订单"); throw new ServiceException("有正在进行的订单", I18nKeyConstant.HAS_UNPAID_ORDER); } // 获取起点经纬度 xp-robotaxi-operation-boot/src/main/resources/i18n/messages.properties
@@ -18,4 +18,5 @@ pricing.json.invalid=价格配置JSON格式不正确 pricing.rule.empty=价格规则不能为空 no.current.point=????????? path.not.found=????? path.not.found=路径不存在 has.unpaid.order=有正在进行的订单 xp-robotaxi-operation-boot/src/main/resources/i18n/messages_en_US.properties
@@ -19,3 +19,4 @@ pricing.rule.empty=Price rule cannot be empty no.current.point=The current location is not open for service path.not.found=Path does not exist has.unpaid.order=There are ongoing orders xp-robotaxi-operation-boot/src/main/resources/i18n/messages_zh_CN.properties
@@ -18,4 +18,5 @@ pricing.json.invalid=价格配置JSON格式不正确 pricing.rule.empty=价格规则不能为空 no.current.point=????????? path.not.found=????? path.not.found=路径不存在 has.unpaid.order=有正在进行的订单 xp-robotaxi-order-boot/src/main/java/com/xiaopeng/order/constant/I18nKeyConstant.java
@@ -19,5 +19,7 @@ String ORDER_REASSIGN_NEW_VEHICLE_NOT_IN_ACCEPT_MODE = "order.reassign.new.vehicle.not.in.accept.mode"; String ORDER_REASSIGN_NEW_VEHICLE_NOT_START_ACCEPT = "order.reassign.new.vehicle.not.start.accept"; String ORDER_REASSIGN_NEW_VEHICLE_NOT_FREE = "order.reassign.new.vehicle.not.free"; String ORDER_STATUS_ERROR = "order.status.error"; String VEHICLE_NOT_EXISTS = "vehicle.not.exists"; } xp-robotaxi-order-boot/src/main/java/com/xiaopeng/order/service/impl/XpOrderServiceImpl.java
@@ -715,13 +715,13 @@ public void cancelOrder(Long orderId, String uid) { XpOrder order = this.getById(orderId); if (order == null) { throw new RuntimeException("订单不存在"); throw new ServiceException("订单不存在",I18nKeyConstant.ORDER_NOT_EXISTS); } if (!order.getAppUserId().toString().equals(uid)) { throw new RuntimeException("无权限取消该订单"); throw new ServiceException("订单不存在",I18nKeyConstant.ORDER_NOT_EXISTS); } if (order.getStatus() > 5 || order.getStatus() < 1) { throw new RuntimeException("订单状态错误"); throw new ServiceException("订单状态错误",I18nKeyConstant.ORDER_STATUS_ERROR); } order.setStatus(0); @@ -731,7 +731,7 @@ R<XpVehicle> xpVehicleR = xpVehicleClient.queryById(vehicleId); XpVehicle xpVehicle = xpVehicleR.getData(); if (xpVehicle == null) { throw new RuntimeException("车辆不存在"); throw new ServiceException("车辆不存在",I18nKeyConstant.VEHICLE_NOT_EXISTS); } cancelTaxiPassengerVo.setVin(xpVehicle.getVehicleVin()); cancelTaxiPassengerVo.setUid(order.getAppUserId().toString()); @@ -779,7 +779,7 @@ public void cancelOrder(String orderId) { XpOrder order = this.getById(orderId); if (order == null) { throw new RuntimeException("订单不存在"); throw new ServiceException("订单不存在",I18nKeyConstant.ORDER_NOT_EXISTS); } order.setStatus(0); baseMapper.updateById(order); @@ -833,13 +833,13 @@ public void comment(XpOrderCommentDto dto, String uid) { XpOrder xpOrder = this.getById(dto.getOrderId()); if (xpOrder == null) { throw new RuntimeException("订单不存在"); throw new ServiceException("订单不存在",I18nKeyConstant.ORDER_NOT_EXISTS); } if (!xpOrder.getAppUserId().toString().equals(uid)) { throw new RuntimeException("无权限评价该订单"); throw new ServiceException("订单不存在",I18nKeyConstant.ORDER_NOT_EXISTS); } if (xpOrder.getStatus() != 9) { throw new RuntimeException("订单状态错误"); throw new ServiceException("订单状态错误",I18nKeyConstant.ORDER_STATUS_ERROR); } xpOrder.setStatus(10); baseMapper.updateById(xpOrder); xp-robotaxi-order-boot/src/main/resources/i18n/messages.properties
@@ -10,4 +10,6 @@ order.reassign.new.vehicle.not.in.accept.mode=新车辆当前不在接单模式 order.reassign.new.vehicle.not.start.accept=新车辆未开始接单 order.reassign.new.vehicle.not.free=新车辆已接单,请重新选择 order.pricing.not.exists=当前城市未配置定价规则 order.pricing.not.exists=当前城市未配置定价规则 order.order.status.error=订单状态错误 vehicle.not.exists=车辆不存在 xp-robotaxi-order-boot/src/main/resources/i18n/messages_en_US.properties
@@ -11,4 +11,6 @@ order.reassign.new.vehicle.not.start.accept=The new vehicle has not started taking orders yet order.reassign.new.vehicle.not.free=The new vehicle has been ordered. Please choose again welcome.message=Welcome to our application! order.pricing.not.exists=The current city has not been configured with pricing rules order.pricing.not.exists=The current city has not been configured with pricing rules order.order.status.error=Order status error vehicle.not.exists=The vehicle does not exist. xp-robotaxi-order-boot/src/main/resources/i18n/messages_zh_CN.properties
@@ -11,4 +11,6 @@ order.reassign.new.vehicle.not.start.accept=新车辆未开始接单 order.reassign.new.vehicle.not.free=新车辆已接单,请重新选择 welcome.message=欢迎来到我们的应用程序! order.pricing.not.exists=当前城市未配置定价规则 order.pricing.not.exists=当前城市未配置定价规则 order.order.status.error=订单状态错误 vehicle.not.exists=车辆不存在