“mitao”
2026-04-17 0ca54dcd125fc97d178d69a7a83e6ceb909ab989
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/controller/XpMapController.java
@@ -32,6 +32,7 @@
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
@Slf4j
@@ -93,11 +94,11 @@
            List<HistoryPointDto> history = new ArrayList<>();
            if(null != dto.getVehicleId()){
                history = redisService.getCacheList("VEHICLE_HISTORY_POINT_LIST:" + dto.getVehicleId());
                if(history.size() > 10){
                    history = history.subList(history.size() - 10, history.size());
                }
                redisService.setCacheList("VEHICLE_HISTORY_POINT_LIST:" + dto.getVehicleId(), history);
            }
            if(history.size() > 10){
                history = history.subList(history.size() - 10, history.size());
            }
            redisService.setCacheList("VEHICLE_HISTORY_POINT_LIST:" + dto.getVehicleId(), history);
            RouteVo routeVo = gdMapGeocodingUtil.getDistanceAndTime(dto.getOrigin(), dto.getDestination(), pointStrParam, fenceId,dto.getRoutePlanRule(), history);
            if(routeVo==null){
                return R.fail("没有找到路线");