| | |
| | | package com.xiaopeng.order.service.impl; |
| | | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | |
| | | // 排行榜中存储的是JSON字符串 |
| | | String jsonString = result.iterator().next().toString(); |
| | | // 使用Hutool的JSON工具解析为XpPointInfoVo对象 |
| | | return cn.hutool.json.JSONUtil.toBean(jsonString, XpPointInfoVo.class); |
| | | return JSONUtil.toBean(jsonString, XpPointInfoVo.class); |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("获取用户快捷胶囊失败: {}", e.getMessage(), e); |
| | |
| | | order.setAcceptanceTime(LocalDateTime.now()); |
| | | AddTaxiPassengerVo addTaxiPassengerVo = new AddTaxiPassengerVo(); |
| | | R<XpVehicle> byVehicleVin = xpVehicleClient.findByVehicleVin(dto.getXpVehicleVin()); |
| | | XpVehicle vehicle = null; |
| | | if (byVehicleVin.getCode() == 200) { |
| | | order.setVehicleId(byVehicleVin.getData().getId()); |
| | | addTaxiPassengerVo.setVin(byVehicleVin.getData().getVehicleVin()); |
| | | vehicle = byVehicleVin.getData(); |
| | | order.setVehicleId(vehicle.getId()); |
| | | addTaxiPassengerVo.setVin(vehicle.getVehicleVin()); |
| | | } |
| | | order.setStatus(2); |
| | | |
| | |
| | | xpPricingClient.updateXpGeoQueryEntity(split[0]); |
| | | this.updateById(order); |
| | | |
| | | // 修改车辆信息 |
| | | vehicle.setState(1); |
| | | xpVehicleClient.updateVehicleById(vehicle); |
| | | |
| | | |
| | | } |
| | | } |
| | | |