puzhibing
2026-03-24 6441b8f5ba7276edf9d495706dc79c2943da7a68
修改登录签名秘钥
10个文件已修改
325 ■■■■■ 已修改文件
xp-robotaxi-automatic-pilot-boot/src/main/java/com/xiaopeng/automaticPilot/controller/OrderMissionController.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-automatic-pilot-boot/src/main/java/com/xiaopeng/automaticPilot/service/KafkaConsumerService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-common/xp-common-core/src/main/java/com/xiaopeng/common/core/constant/TokenConstants.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-common/xp-common-core/src/main/java/com/xiaopeng/common/core/utils/JwtUtils.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-common/xp-common-security/src/main/java/com/xiaopeng/common/security/auth/AuthLogic.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-common/xp-common-security/src/main/java/com/xiaopeng/common/security/handler/GlobalExceptionHandler.java 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-common/xp-common-security/src/main/java/com/xiaopeng/common/security/service/TokenService.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-gateway-boot/src/main/java/com/xiaopeng/gateway/filter/AuthFilter.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-itinerary-boot/src/main/java/com/xiaopeng/itinerary/service/XpPricingService.java 1 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-itinerary-boot/src/main/java/com/xiaopeng/itinerary/service/impl/XpPricingServiceImpl.java 253 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
xp-robotaxi-automatic-pilot-boot/src/main/java/com/xiaopeng/automaticPilot/controller/OrderMissionController.java
@@ -19,6 +19,7 @@
import com.xiaopeng.api.feignClient.pushMessage.XpPushMessageClient;
import com.xiaopeng.api.feignClient.vehicleConvoy.XpVehicleClient;
import com.xiaopeng.api.model.order.XpOrder;import com.xiaopeng.api.model.vehicleConvoy.XpVehicle;
import com.xiaopeng.api.vo.OrderType;
import com.xiaopeng.api.vo.SystemEventType;
import com.xiaopeng.api.vo.automaticPilot.VehiclePosition;
import com.xiaopeng.api.vo.automaticPilot.protobuf.*;
@@ -236,7 +237,7 @@
            }else if(dto.getOrderId().contains("TEST")){
                jsonObject.put("orderType",  com.xiaopeng.api.vo.OrderType.TEST_ORDER);
            }else {
                jsonObject.put("orderType",  com.xiaopeng.api.vo.OrderType.CRUISE_ORDER);
                jsonObject.put("orderType",  com.xiaopeng.api.vo.OrderType.USER_ORDER);
            }
            jsonObject.put("orderId", dto.getOrderId());
            jsonObject.put("vin", dto.getVin());
xp-robotaxi-automatic-pilot-boot/src/main/java/com/xiaopeng/automaticPilot/service/KafkaConsumerService.java
@@ -583,6 +583,7 @@
            XpVehicle xpVehicle = xpVehicleClient.queryById(xpOrder.getVehicleId()).getData();
            //驶往上车点的行程
            if (3 == xpOrder.getStatus()) {
                redisService.deleteObject("ORDER_NAVIGATION_START_DATA:" + xpOrder.getAppUserId());
                //查询司机当前位置到起点的线路
                origin.setLongitude(longitude);
                origin.setLatitude(latitude);
@@ -763,6 +764,7 @@
                if (Objects.isNull(vehiclePosition)) {
                    throw new RuntimeException("车辆位置信息不存在");
                }
                redisService.deleteObject("ORDER_NAVIGATION_START_DATA:" + xpOrder.getAppUserId());
                //查询司机当前位置到起点的线路
                origin.setLongitude(vehiclePosition.getPoint().getX());
                origin.setLatitude(vehiclePosition.getPoint().getY());
xp-robotaxi-common/xp-common-core/src/main/java/com/xiaopeng/common/core/constant/TokenConstants.java
@@ -16,11 +16,6 @@
     * 令牌前缀
     */
    public static final String PREFIX = "Bearer ";
    /**
     * 令牌秘钥
     */
    public final static String SECRET = "iymGhx1XkAAHrex2Zf4ASbiD9P2ksTam";
    
    /**
     * 参数签名
xp-robotaxi-common/xp-common-core/src/main/java/com/xiaopeng/common/core/utils/JwtUtils.java
@@ -15,7 +15,6 @@
 */
public class JwtUtils
{
    public static String secret = TokenConstants.SECRET;
    /**
     * 从数据声明生成令牌
@@ -23,7 +22,7 @@
     * @param claims 数据声明
     * @return 令牌
     */
    public static String createToken(Map<String, Object> claims)
    public static String createToken(Map<String, Object> claims, String secret)
    {
        String token = Jwts.builder().setClaims(claims).signWith(SignatureAlgorithm.HS512, secret).compact();
        return token;
@@ -35,7 +34,7 @@
     * @param token 令牌
     * @return 数据声明
     */
    public static Claims parseToken(String token)
    public static Claims parseToken(String token, String secret)
    {
        return Jwts.parser().setSigningKey(secret).parseClaimsJws(token).getBody();
    }
@@ -46,9 +45,9 @@
     * @param token 令牌
     * @return 用户ID
     */
    public static String getUserKey(String token)
    public static String getUserKey(String token, String secret)
    {
        Claims claims = parseToken(token);
        Claims claims = parseToken(token, secret);
        return getValue(claims, SecurityConstants.USER_KEY);
    }
    /**
@@ -57,9 +56,9 @@
     * @param token 令牌
     * @return 用户ID
     */
    public static String getOperationUserKey(String token)
    public static String getOperationUserKey(String token, String secret)
    {
        Claims claims = parseToken(token);
        Claims claims = parseToken(token, secret);
        return getValue(claims, SecurityConstants.OPERATION_USER_KEY);
    }
@@ -91,9 +90,9 @@
     * @param token 令牌
     * @return 用户类型
     */
    public static String getUserType(String token)
    public static String getUserType(String token, String secret)
    {
        Claims claims = parseToken(token);
        Claims claims = parseToken(token,  secret);
        return getValue(claims, SecurityConstants.USER_TYPE);
    }
    
@@ -116,9 +115,9 @@
     * @param token 令牌
     * @return 用户ID
     */
    public static String getUserKeyApplet(String token)
    public static String getUserKeyApplet(String token, String secret)
    {
        Claims claims = parseToken(token);
        Claims claims = parseToken(token,  secret);
        return getValue(claims, SecurityConstants.USER_APPLET_KEY);
    }
    /**
@@ -127,9 +126,9 @@
     * @param token 令牌
     * @return 用户ID
     */
    public static String getUserId(String token)
    public static String getUserId(String token, String secret)
    {
        Claims claims = parseToken(token);
        Claims claims = parseToken(token,  secret);
        return getValue(claims, SecurityConstants.DETAILS_USER_ID);
    }
@@ -151,9 +150,9 @@
     * @param token 令牌
     * @return 用户名
     */
    public static String getUserName(String token)
    public static String getUserName(String token, String secret)
    {
        Claims claims = parseToken(token);
        Claims claims = parseToken(token,  secret);
        return getValue(claims, SecurityConstants.DETAILS_USERNAME);
    }
xp-robotaxi-common/xp-common-security/src/main/java/com/xiaopeng/common/security/auth/AuthLogic.java
@@ -81,7 +81,7 @@
        {
            throw new NotLoginException("未提供token");
        }
        Claims claims = JwtUtils.parseToken(token);
        Claims claims = JwtUtils.parseToken(token, tokenService.getSecret());
        String userType = JwtUtils.getUserType(claims);
        LoginUser loginUser = SecurityUtils.getLoginUser();
        if (loginUser == null && "system".equals(userType))
xp-robotaxi-common/xp-common-security/src/main/java/com/xiaopeng/common/security/handler/GlobalExceptionHandler.java
@@ -106,7 +106,7 @@
    public AjaxResult handleRuntimeException(RuntimeException e, HttpServletRequest request) {
        String requestURI = request.getRequestURI();
        log.error("请求地址'{}',发生未知异常.", requestURI, e);
        return AjaxResult.error(e.getMessage());
        return AjaxResult.error("系统繁忙,请稍后重试");
    }
    
    /**
@@ -116,7 +116,7 @@
    public AjaxResult handleException(Exception e, HttpServletRequest request) {
        String requestURI = request.getRequestURI();
        log.error("请求地址'{}',发生系统异常.", requestURI, e);
        return AjaxResult.error(e.getMessage());
        return AjaxResult.error("系统繁忙,请稍后重试");
    }
    
    /**
xp-robotaxi-common/xp-common-security/src/main/java/com/xiaopeng/common/security/service/TokenService.java
@@ -9,6 +9,7 @@
import com.xiaopeng.common.core.exception.auth.NotLoginException;
import com.xiaopeng.api.vo.account.LoginUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import com.xiaopeng.common.core.constant.CacheConstants;
import com.xiaopeng.common.core.constant.SecurityConstants;
@@ -29,6 +30,9 @@
public class TokenService {
    @Autowired
    private RedisService redisService;
    @Value("${token.secret}")
    private String secret;
    
    protected static final long MILLIS_SECOND = 1000;
    
@@ -62,7 +66,7 @@
        claimsMap.put(SecurityConstants.DETAILS_USERNAME, userName);
        // 接口返回信息
        Map<String, Object> rspMap = new HashMap<String, Object>();
        rspMap.put("access_token", JwtUtils.createToken(claimsMap));
        rspMap.put("access_token", JwtUtils.createToken(claimsMap, secret));
        rspMap.put("expires_in", expireTime);
        return rspMap;
    }
@@ -90,7 +94,7 @@
        claimsMap.put(SecurityConstants.DETAILS_USERNAME, userName);
        // 接口返回信息
        Map<String, Object> rspMap = new HashMap<String, Object>();
        rspMap.put("access_token", JwtUtils.createToken(claimsMap));
        rspMap.put("access_token", JwtUtils.createToken(claimsMap, secret));
        rspMap.put("expires_in", expireTime);
        return rspMap;
    }
@@ -150,7 +154,7 @@
        LoginUser user = null;
        try {
            if (StringUtils.isNotEmpty(token)) {
                String userkey = JwtUtils.getUserKey(token);
                String userkey = JwtUtils.getUserKey(token, secret);
                user = redisService.getCacheObject(getTokenKey(userkey));
                return user;
            }
@@ -167,7 +171,7 @@
        LoginOperationUser user = null;
        try {
            if (StringUtils.isNotEmpty(token)) {
                String userkey = JwtUtils.getOperationUserKey(token);
                String userkey = JwtUtils.getOperationUserKey(token, secret);
                user = redisService.getCacheObject(getTokenKey(userkey));
                return user;
            }
@@ -190,7 +194,7 @@
     */
    public void delLoginUser(String token) {
        if (StringUtils.isNotEmpty(token)) {
            String userkey = JwtUtils.getUserKey(token);
            String userkey = JwtUtils.getUserKey(token, secret);
            redisService.deleteObject(getTokenKey(userkey));
        }
    }
@@ -253,4 +257,8 @@
    private String getUserKey(Long userid) {
        return ACCESS_TOKEN + userid;
    }
    public String getSecret() {
        return secret;
    }
}
xp-robotaxi-gateway-boot/src/main/java/com/xiaopeng/gateway/filter/AuthFilter.java
@@ -5,6 +5,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.gateway.filter.GatewayFilterChain;
import org.springframework.cloud.gateway.filter.GlobalFilter;
import org.springframework.core.Ordered;
@@ -46,6 +47,9 @@
    @Autowired
    private RedisService redisService;
    @Value("${token.secret}")
    private String secret;
    
    
    
@@ -69,7 +73,7 @@
        String token = getToken(request);
        Claims claims = JwtUtils.parseToken(token);
        Claims claims = JwtUtils.parseToken(token, secret);
        String userkey = JwtUtils.getUserKey(claims);
        String userid = JwtUtils.getUserId(claims);
        String username = JwtUtils.getUserName(claims);
@@ -153,7 +157,7 @@
        if (StringUtils.isEmpty(token)) {
            throw new NotLoginException("令牌不能为空");
        }
        Claims claims = JwtUtils.parseToken(token);
        Claims claims = JwtUtils.parseToken(token, secret);
        if (claims == null) {
            throw new NotLoginException("令牌已过期或验证不正确!");
        }
xp-robotaxi-itinerary-boot/src/main/java/com/xiaopeng/itinerary/service/XpPricingService.java
@@ -45,6 +45,5 @@
     */
    String saveOrder(XpOrderDto dto, String uid);
    void testOrder(Long orderId, Integer status);
}
xp-robotaxi-itinerary-boot/src/main/java/com/xiaopeng/itinerary/service/impl/XpPricingServiceImpl.java
@@ -489,16 +489,16 @@
        }
        // 判断当天取消的次数 后台配置 redis 查询
//        Object cancelOrder = redisService.getCacheObject("CANCEL_ORDER_" + uid);
//        log.info("取消次数:{}", cancelOrder);
//        // 静默处理
//        boolean isSilent = false;
//        if (cancelOrder != null) {
//            Integer num = Integer.valueOf(cancelOrder.toString());
//            if (num >= cancelCount) {
//                isSilent = true;
//            }
//        }
        Object cancelOrder = redisService.getCacheObject("CANCEL_ORDER_" + uid);
        log.info("取消次数:{}", cancelOrder);
        // 静默处理
        boolean isSilent = false;
        if (cancelOrder != null) {
            Integer num = Integer.valueOf(cancelOrder.toString());
            if (num >= cancelCount) {
                isSilent = true;
            }
        }
        // 获取起步里程
@@ -522,13 +522,7 @@
        // 生成订单数据
        XpOrder xpOrder = new XpOrder();
        xpOrder.setMileageKilometers(0.0);
//        xpOrder.setVehicleId(1l);
//        xpOrder.setStartMileage(Double.valueOf(startMileage));
        xpOrder.setAppUserId(Long.valueOf(uid));
        xpOrder.setOrderNumber("XP" + System.currentTimeMillis());
        xpOrder.setPlacementLon(dto.getPlacementLon());
@@ -588,10 +582,10 @@
        xpOrder.setId(orderId);
        // 静默处理 不推单
//        if (isSilent) {
//            log.info("订单取消次数达到上限,执行静默处理,不推单。");
//            return orderId.toString();
//        }
        if (isSilent) {
            log.info("订单取消次数达到上限,执行静默处理,不推单。");
            return orderId.toString();
        }
        // 最大距离
        Object maxPushDistanceObj = redisService.getCacheObject(CacheConstants.MAX_PUSH_DISTANCE);
@@ -707,224 +701,5 @@
    }
    /**
     * 测试阶段用于自动完成小程序的整个流程数据状态流转
     * @param orderId
     */
    public void testOrder(Long orderId, Integer status) {
        XpOrder xpOrder = xpOrderClient.queryOrderById(orderId).getData();
        Long appUserId = xpOrder.getAppUserId();
        if (2 == status) {
            if (xpOrder.getStatus() == 0) {
                return;
            }
            xpOrder.setAppUserId(null);
            xpOrder.setStatus(2);
            xpOrder.setVehicleId(1L);
            xpOrder.setFleetId(2L);
            xpOrderClient.updateOrder(xpOrder);
        }
        if (3 == status) {
            //修改状态为接驾中
            xpOrder = xpOrderClient.queryOrderById(orderId).getData();
            if (xpOrder.getStatus() == 0) {
                return;
            }
            xpOrder.setAppUserId(null);
            xpOrder.setStatus(3);
            xpOrderClient.updateOrder(xpOrder);
            //发送订单状态
            SendMessageDTO dto = new SendMessageDTO();
            dto.setAppUserId(appUserId.toString());
            dto.setMessage("{\"type\":\"ORDER_STATUS\",\"content\":\"{\\\"orderId\\\":\\\"" + orderId + "\\\",\\\"status\\\":3}\",\"timestamp\":\"176569945845456\"}");
            xpPushMessageClient.sendStatus(dto);
            //推送车辆位置
            dto.setAppUserId(appUserId.toString());
            dto.setMessage("{\"type\":\"VEHICLE_LOCATION\",\"content\":\"{\\\"orderId\\\":\\\"" + orderId + "\\\",\\\"lon\\\":113.385848,\\\"lat\\\":23.156841}\",\"timestamp\":\"176569945845456\"}");
            xpPushMessageClient.sendVehicleLocation(dto);
            //发送车辆到达起点的轨迹
            OrderRouteAndFareDto routeAndFareDto = new OrderRouteAndFareDto();
            LonLatDto destination = new LonLatDto();
            destination.setLongitude(xpOrder.getStartLon());
            destination.setLatitude(xpOrder.getStartLat());
            routeAndFareDto.setDestination(destination);
            LonLatDto origin = new LonLatDto();
            origin.setLongitude(113.385848);
            origin.setLatitude(23.156841);
            routeAndFareDto.setOrigin(origin);
            routeAndFareDto.setRouteType(1);
            routeAndFareDto.setOrderId(orderId);
            RouteVo routeVo = xpMapClient.getOrderDistanceAndDuration(routeAndFareDto).getData();
            com.alibaba.fastjson2.JSONObject jsonObject = new com.alibaba.fastjson2.JSONObject();
            jsonObject.put("type", "ORDER_ROUTE");
            jsonObject.put("timestamp", System.currentTimeMillis());
            com.alibaba.fastjson2.JSONObject content = new com.alibaba.fastjson2.JSONObject();
            content.put("orderId", orderId.toString());
            content.put("routeType", 1);
            com.alibaba.fastjson2.JSONObject route = new com.alibaba.fastjson2.JSONObject();
            route.put("distance", routeVo.getDistance());
            route.put("duration", routeVo.getDuration());
            route.put("routeID", routeVo.getRouteID());
            List<com.alibaba.fastjson2.JSONObject> collect = routeVo.getPolyline().stream().map(item -> {
                com.alibaba.fastjson2.JSONObject point = new com.alibaba.fastjson2.JSONObject();
                point.put("latitude", item.getLatitude());
                point.put("longitude", item.getLongitude());
                return point;
            }).collect(Collectors.toList());
            route.put("polyline", JSON.toJSONString(collect));
            content.put("route", route.toJSONString());
            jsonObject.put("content", content.toJSONString());
            SendMessageDTO messageDTO = new SendMessageDTO();
            messageDTO.setAppUserId(appUserId.toString());
            messageDTO.setMessage(jsonObject.toJSONString());
            xpPushMessageClient.sendRoute(messageDTO);
        }
        if (4 == status) {
            //司机到达起点
            xpOrder = xpOrderClient.queryOrderById(orderId).getData();
            if (xpOrder.getStatus() == 0) {
                return;
            }
            xpOrder.setAppUserId(null);
            xpOrder.setStatus(4);
            xpOrderClient.updateOrder(xpOrder);
            SendMessageDTO dto = new SendMessageDTO();
            dto.setAppUserId(appUserId.toString());
            dto.setMessage("{\"type\":\"ORDER_STATUS\",\"content\":\"{\\\"orderId\\\":\\\"" + orderId + "\\\",\\\"status\\\":4}\",\"timestamp\":\"176569945845456\"}");
            xpPushMessageClient.sendStatus(dto);
            //推送车辆位置到起点
            dto.setAppUserId(appUserId.toString());
            dto.setMessage("{\"type\":\"VEHICLE_LOCATION\",\"content\":\"{\\\"orderId\\\":\\\"" + orderId + "\\\",\\\"lon\\\":" + xpOrder.getStartLon() + ",\\\"lat\\\":" + xpOrder.getStartLat() + "}\",\"timestamp\":\"176569945845456\"}");
            xpPushMessageClient.sendVehicleLocation(dto);
        }
        if (5 == status) {
            //乘客上车
            xpOrder = xpOrderClient.queryOrderById(orderId).getData();
            if (xpOrder.getStatus() == 0) {
                return;
            }
            xpOrder.setAppUserId(null);
            xpOrder.setStatus(5);
            xpOrder.setBoardingTime(LocalDateTime.now());
            xpOrder.setBoardingLat(xpOrder.getStartLat());
            xpOrder.setBoardingLon(xpOrder.getStartLon());
            xpOrder.setBoardingAddress(xpOrder.getStartAddress());
            xpOrderClient.updateOrder(xpOrder);
            SendMessageDTO dto = new SendMessageDTO();
            dto.setAppUserId(appUserId.toString());
            dto.setMessage("{\"type\":\"ORDER_STATUS\",\"content\":\"{\\\"orderId\\\":\\\"" + orderId + "\\\",\\\"status\\\":5}\",\"timestamp\":\"176569945845456\"}");
            xpPushMessageClient.sendStatus(dto);
            //推送起点到终点的行驶轨迹
            OrderRouteAndFareDto routeAndFareDto = new OrderRouteAndFareDto();
            routeAndFareDto.setDestination(new LonLatDto(xpOrder.getEndLon(), xpOrder.getEndLat()));
            routeAndFareDto.setOrigin(new LonLatDto(xpOrder.getStartLon(), xpOrder.getStartLat()));
            routeAndFareDto.setRouteType(2);
            routeAndFareDto.setOrderId(orderId);
            RouteVo routeVo = xpMapClient.getOrderDistanceAndDuration(routeAndFareDto).getData();
            com.alibaba.fastjson2.JSONObject jsonObject = new com.alibaba.fastjson2.JSONObject();
            jsonObject.put("type", "ORDER_ROUTE");
            jsonObject.put("timestamp", System.currentTimeMillis());
            com.alibaba.fastjson2.JSONObject content = new com.alibaba.fastjson2.JSONObject();
            content.put("orderId", orderId.toString());
            content.put("routeType", 2);
            com.alibaba.fastjson2.JSONObject route = new com.alibaba.fastjson2.JSONObject();
            route.put("distance", routeVo.getDistance());
            route.put("duration", routeVo.getDuration());
            route.put("routeID", routeVo.getRouteID());
            List<com.alibaba.fastjson2.JSONObject> collect = routeVo.getPolyline().stream().map(item -> {
                com.alibaba.fastjson2.JSONObject point = new com.alibaba.fastjson2.JSONObject();
                point.put("latitude", item.getLatitude());
                point.put("longitude", item.getLongitude());
                return point;
            }).collect(Collectors.toList());
            route.put("polyline", JSON.toJSONString(collect));
            content.put("route", route.toJSONString());
            jsonObject.put("content", content.toJSONString());
            SendMessageDTO messageDTO = new SendMessageDTO();
            messageDTO.setAppUserId(appUserId.toString());
            messageDTO.setMessage(jsonObject.toJSONString());
            xpPushMessageClient.sendRoute(messageDTO);
        }
        if (6 == status) {
            //开始服务中
            xpOrder.setAppUserId(null);
            xpOrder.setStatus(6);
            xpOrder.setTripBegin(LocalDateTime.now());
            xpOrderClient.updateOrder(xpOrder);
            SendMessageDTO dto = new SendMessageDTO();
            dto.setAppUserId(appUserId.toString());
            dto.setMessage("{\"type\":\"ORDER_STATUS\",\"content\":\"{\\\"orderId\\\":\\\"" + orderId + "\\\",\\\"status\\\":6}\",\"timestamp\":\"176569945845456\"}");
            xpPushMessageClient.sendStatus(dto);
        }
        if (7 == status) {
            //乘客待下车
            xpOrder.setAppUserId(null);
            xpOrder.setStatus(7);
            xpOrder.setTripEnd(LocalDateTime.now());
            xpOrder.setGetoffLat(xpOrder.getEndLat());
            xpOrder.setGetoffLon(xpOrder.getEndLon());
            xpOrder.setGetoffAddress(xpOrder.getEndAddress());
            xpOrder.setGetoffTime(LocalDateTime.now());
            xpOrder.setOrderMoney(new BigDecimal(50));
            xpOrder.setStartMileage(5D);
            xpOrder.setStartMoney(new BigDecimal(10));
            xpOrder.setMileageKilometers(10D);
            xpOrder.setMileageMoney(new BigDecimal(25));
            xpOrder.setDuration(20D);
            xpOrder.setDurationMoney(new BigDecimal(5));
            xpOrder.setWait(0D);
            xpOrder.setWaitMoney(new BigDecimal(0));
            xpOrder.setLongDistance(10D);
            xpOrder.setLongDistanceType(1);
            xpOrder.setLongDistancemoney(new BigDecimal(10));
            xpOrderClient.updateOrder(xpOrder);
            //推送车辆位置到起点
            SendMessageDTO dto = new SendMessageDTO();
            dto.setAppUserId(appUserId.toString());
            dto.setMessage("{\"type\":\"VEHICLE_LOCATION\",\"content\":\"{\\\"orderId\\\":\\\"" + orderId + "\\\",\\\"lon\\\":" + xpOrder.getEndLon() + ",\\\"lat\\\":" + xpOrder.getEndLat() + "}\",\"timestamp\":\"176569945845456\"}");
            xpPushMessageClient.sendVehicleLocation(dto);
            dto.setAppUserId(appUserId.toString());
            dto.setMessage("{\"type\":\"ORDER_STATUS\",\"content\":\"{\\\"orderId\\\":\\\"" + orderId + "\\\",\\\"status\\\":7}\",\"timestamp\":\"176569945845456\"}");
            xpPushMessageClient.sendStatus(dto);
        }
        //添加费用明细
//            XpOrderDetail detail = new XpOrderDetail();
//            detail.setDetailType(1);
//            detail.setOrderId(orderId);
//            detail.setType(1);
//            detail.setTime("");
//            detail.setDuration(20D);
//            detail.setMileage(new BigDecimal(10));
//            detail.setMoney();
//            detail.setIsDeleted(false);
//            detail.setCreateTime(LocalDateTime.now());
//            detail.setUpdateTime(LocalDateTime.now());
//            xpOrder
        if (8 == status) {
            //乘客待支付
            xpOrder.setAppUserId(null);
            xpOrder.setStatus(8);
            xpOrderClient.updateOrder(xpOrder);
            SendMessageDTO dto = new SendMessageDTO();
            dto.setAppUserId(appUserId.toString());
            dto.setMessage("{\"type\":\"ORDER_STATUS\",\"content\":\"{\\\"orderId\\\":\\\"" + orderId + "\\\",\\\"status\\\":8}\",\"timestamp\":\"176569945845456\"}");
            xpPushMessageClient.sendStatus(dto);
        }
        if (9 == status) {
            //乘客支付成功
            xpOrder.setAppUserId(null);
            xpOrder.setStatus(9);
            xpOrderClient.updateOrder(xpOrder);
            SendMessageDTO dto = new SendMessageDTO();
            dto.setAppUserId(appUserId.toString());
            dto.setMessage("{\"type\":\"ORDER_STATUS\",\"content\":\"{\\\"orderId\\\":\\\"" + orderId + "\\\",\\\"status\\\":9}\",\"timestamp\":\"176569945845456\"}");
            xpPushMessageClient.sendStatus(dto);
        }
    }
}