puzhibing
2026-03-17 f46a765606bbc83f508a075baaf15537d6db6cfd
xp-robotaxi-push-message-boot/src/main/java/com/xiaopeng/pushMessage/controller/PushOrderRouteController.java
@@ -15,6 +15,7 @@
import com.xiaopeng.common.redis.service.RedisService;
import com.xiaopeng.pushMessage.utils.MapMatchingUtil;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.powermock.core.ListMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
@@ -26,6 +27,7 @@
import java.util.*;
import java.util.concurrent.TimeUnit;
@Slf4j
@Api(tags = "订单推送轨迹接口")
@RestController
@RequestMapping("")
@@ -74,8 +76,6 @@
            routeVo.setPolyline(lonLatDtos);
            // 存储最新路线偏离缓存,后续进行轨迹截取
//            redisService.setCacheObject(CacheConstants.ORDER_ROUTE_CAPTURE + "_" + dto.getOrderId() + "_" +routeType, routeVo);
            redisService.setCacheObject(key, JSON.toJSONString(routeVo), 24L, TimeUnit.HOURS);
            // 封装轨迹点位集合
@@ -109,6 +109,7 @@
            sendMessageDTO.setAppUserId(String.valueOf(xpOrder.getAppUserId()));
            sendMessageDTO.setMessage(JSONObject.toJSONString(params));
            xpPushMessageClient.sendRoute(sendMessageDTO);
            log.info("推送剩余导航数据成功 {} {}", xpOrder.getOrderNumber(), JSON.toJSONString(routeVo));
        }
        return R.ok();
    }