| | |
| | | XpGeoQueryEntity xpGeoQueryEntity = new XpGeoQueryEntity(); |
| | | String[] split = popFirstElement.split("_"); |
| | | xpGeoQueryEntity.setOrderId(split[0]); |
| | | String[] split1 = split[1].split(","); |
| | | xpGeoQueryEntity.setLocation(new GeoJsonPoint(Double.parseDouble(split1[0]), Double.parseDouble(split1[1]))); |
| | | xpGeoQueryEntity.setTimestamp(new Date()); |
| | | // 计算2个时间的秒数 |
| | | LocalDateTime createTime = order.getCreateTime(); |
| | | LocalDateTime acceptanceTime = order.getAcceptanceTime(); |
| | | xpGeoQueryEntity.setSeconds((int) Duration.between(createTime, acceptanceTime).getSeconds()); |
| | | String currentTimeSlot = DateUtils.getCurrentTimeSlot(); |
| | | xpGeoQueryEntity.setTime(currentTimeSlot); |
| | | // 存mongo数据 |
| | | xpPricingClient.saveXpGeoQueryEntity(xpGeoQueryEntity); |
| | | xpPricingClient.updateXpGeoQueryEntity(split[0]); |
| | | this.updateById(order); |
| | | |
| | | } |