“mitao”
2026-04-17 246c72b8e1cba97de66efd8112ed166210ebc686
xp-robotaxi-map-boot/src/main/java/com/xiaopeng/map/service/serviceimpl/XpPointServiceImpl.java
@@ -107,6 +107,7 @@
        if (pointAddDto.getElectronicAreaId() == null) {
            throw new ServiceException("运营区域ID不能为空", I18nKeyConstant.POINT_ELECTRONIC_AREA_ID_EMPTY);
        }
        validatePointNameUnique(pointAddDto.getPointName(), null);
        String cityPrefix = buildCityPrefix(pointAddDto.getElectronicAreaId());
        String lockKey = buildPointNumberLockKey(cityPrefix, POINT_BIZ_TYPE);
@@ -147,6 +148,20 @@
    }
    @Override
    public void validatePointNameUnique(String pointName, Long excludeId) {
        if (!StringUtils.hasText(pointName)) {
            return;
        }
        long count = this.lambdaQuery()
                .eq(XpPoint::getPointName, pointName)
                .ne(excludeId != null, XpPoint::getId, excludeId)
                .count();
        if (count > 0) {
            throw new ServiceException("点位名称已存在", I18nKeyConstant.POINT_NAME_EXISTS);
        }
    }
    @Override
    public NearestVo nearest(NearestDto dto) {
        // 走缓存
        Object orderDistanceObj = redisService.getCacheObject(CacheConstants.NEAR_POINT_DISTANCE);