From c3004ab759eb78f00d0a00f9662ec6d3f5253002 Mon Sep 17 00:00:00 2001
From: liujie <1793218484@qq.com>
Date: 星期五, 06 三月 2026 16:08:21 +0800
Subject: [PATCH] 修改bug

---
 xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/service/impl/XpGeoQueryEntityServiceImpl.java |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/service/impl/XpGeoQueryEntityServiceImpl.java b/xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/service/impl/XpGeoQueryEntityServiceImpl.java
index 1b5f6b9..c23e082 100644
--- a/xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/service/impl/XpGeoQueryEntityServiceImpl.java
+++ b/xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/service/impl/XpGeoQueryEntityServiceImpl.java
@@ -40,7 +40,7 @@
      */
     @Override
     public List<XpGeoQueryEntity> findByLocationWithin500MetersAndLastWeekAndStatusGreater(
-            double longitude, 
+            double longitude,
             double latitude,
             String time
     ) {
@@ -105,7 +105,6 @@
     }
 
 
-
     @Override
     public XpGeoQueryEntity updateByOrderId(String orderId) {
         Query query = new Query(Criteria.where("orderId").is(orderId));
@@ -114,9 +113,9 @@
         Long timestamp = xpGeoQueryEntity.getTimestamp();
         long time = new Date().getTime();
         // 计算2个时间的秒数差
-        long seconds = (time- timestamp) / 1000;
+        long seconds = (time - timestamp) / 1000;
         Update update = new Update().set("seconds", seconds).set("status", 1);
-        if(xpGeoQueryEntity.getStatus()==0){
+        if (xpGeoQueryEntity.getStatus() == 0) {
             mongoTemplate.findAndModify(query, update, XpGeoQueryEntity.class);
         }
         return null;
@@ -150,4 +149,11 @@
     public List<XpGeoQueryEntity> findAll() {
         return repository.findAll();
     }
+
+    @Override
+    public void deleteXpGeoQueryEntity(String orderId) {
+        Query query = new Query(Criteria.where("orderId").is(orderId));
+        Update update = new Update().set("status", 2);
+        mongoTemplate.findAndModify(query, update, XpGeoQueryEntity.class);
+    }
 }

--
Gitblit v1.7.1