From c96fbe6b0aeb413a17c429133ee6d81d138144b9 Mon Sep 17 00:00:00 2001
From: liujie <1793218484@qq.com>
Date: 星期二, 09 六月 2026 10:58:52 +0800
Subject: [PATCH] Merge branch '1.0' of http://120.76.84.145:10101/gitblit/r/java/Robotaxi into 1.0

---
 xp-robotaxi-automatic-pilot-boot/src/main/java/com/xiaopeng/automaticPilot/service/impl/VehicleRtInfoServiceImpl.java |   19 +++++++++++--------
 1 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/xp-robotaxi-automatic-pilot-boot/src/main/java/com/xiaopeng/automaticPilot/service/impl/VehicleRtInfoServiceImpl.java b/xp-robotaxi-automatic-pilot-boot/src/main/java/com/xiaopeng/automaticPilot/service/impl/VehicleRtInfoServiceImpl.java
index c7b8606..8488246 100644
--- a/xp-robotaxi-automatic-pilot-boot/src/main/java/com/xiaopeng/automaticPilot/service/impl/VehicleRtInfoServiceImpl.java
+++ b/xp-robotaxi-automatic-pilot-boot/src/main/java/com/xiaopeng/automaticPilot/service/impl/VehicleRtInfoServiceImpl.java
@@ -84,7 +84,7 @@
         }
 
         String code = MsgUtil.createCode();
-        log.info("Robotaxi SMS code generated for mobile {}: {}", request.getMobile(), code);
+        log.info("Robotaxi SMS code generated for mobile {}", maskMobile(request.getMobile()));
         
         // TODO: Call SMS interface to send code when available
 //         sendSms(request.getMobile(), code);
@@ -159,18 +159,14 @@
     }
 
     private XpCommonResponse<?> validateVehicleReadyIfNeeded(String smsType, String vin) {
-        if (!SmsType.ACCEPT_RIDES.name().equals(smsType)) {
-            return null;
-        }
         XpVehicle vehicle = xpVehicleClient.findByVehicleVin(vin).getData();
         if (vehicle == null) {
             return XpCommonResponse.fail(RobotaxiErrorEnum.MOBILE_VIN_MISMATCH);
         }
-        Integer status = vehicle.getStatus();
         Integer operatingStatus = vehicle.getOperatingStatus();
-        if (smsType.equals(SmsType.ACCEPT_RIDES.name()) && operatingStatus != 1) {
-            return XpCommonResponse.fail(RobotaxiErrorEnum.VEHICLE_NOT_READY);
-        }
+//        if (smsType.equals(SmsType.ACCEPT_RIDES.name()) && operatingStatus != 1) {
+//            return XpCommonResponse.fail(RobotaxiErrorEnum.VEHICLE_NOT_READY);
+//        }
         if (smsType.equals(SmsType.STOP_ACCEPT_RIDES.name()) && operatingStatus != 3) {
             return XpCommonResponse.fail(RobotaxiErrorEnum.VEHICLE_NOT_READY);
         }
@@ -212,4 +208,11 @@
     private String buildSmsCodeKey(String smsType, String vin, String mobile) {
         return "ROBOTAXI_SMS_CODE:" + smsType + ":" + vin + ":" + mobile;
     }
+
+    private String maskMobile(String mobile) {
+        if (StringUtils.isEmpty(mobile) || mobile.length() < 7) {
+            return "******";
+        }
+        return mobile.substring(0, 3) + "****" + mobile.substring(mobile.length() - 4);
+    }
 }

--
Gitblit v1.7.1