| | |
| | | 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; |
| | |
| | | import java.util.*; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | @Slf4j |
| | | @Api(tags = "订单推送轨迹接口") |
| | | @RestController |
| | | @RequestMapping("") |
| | |
| | | routeVo.setPolyline(lonLatDtos); |
| | | |
| | | // 存储最新路线偏离缓存,后续进行轨迹截取 |
| | | // redisService.setCacheObject(CacheConstants.ORDER_ROUTE_CAPTURE + "_" + dto.getOrderId() + "_" +routeType, routeVo); |
| | | |
| | | redisService.setCacheObject(key, JSON.toJSONString(routeVo), 24L, TimeUnit.HOURS); |
| | | |
| | | // 封装轨迹点位集合 |
| | |
| | | sendMessageDTO.setAppUserId(String.valueOf(xpOrder.getAppUserId())); |
| | | sendMessageDTO.setMessage(JSONObject.toJSONString(params)); |
| | | xpPushMessageClient.sendRoute(sendMessageDTO); |
| | | log.info("推送剩余导航数据成功 {} {}", xpOrder.getOrderNumber(), JSON.toJSONString(routeVo)); |
| | | } |
| | | return R.ok(); |
| | | } |