From 9f3485f2e619f011d17952b4e2dac09ec702b724 Mon Sep 17 00:00:00 2001
From: wanglizhong <wlz>
Date: 星期三, 14 五月 2025 17:48:27 +0800
Subject: [PATCH] fix:gps 查询修改超时时间 180000

---
 ruoyi-system/src/main/resources/mapper/system/VehicleGpsMapper.xml |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/ruoyi-system/src/main/resources/mapper/system/VehicleGpsMapper.xml b/ruoyi-system/src/main/resources/mapper/system/VehicleGpsMapper.xml
index 98a65fe..9e01aae 100644
--- a/ruoyi-system/src/main/resources/mapper/system/VehicleGpsMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/VehicleGpsMapper.xml
@@ -110,4 +110,13 @@
     <select id="getVehicleIdByNo" parameterType="String" resultType="Long">
         select vehicle_id from tb_vehicle_info where vehicle_no = #{vehicleNo}
     </select>
+
+    <delete id="deleteVehicleGpsBeforeDate">
+        delete g from tb_vehicle_gps g
+        where g.collect_time &lt; (
+            select date_sub(max(collect_time), interval 2 day)
+            from tb_vehicle_gps g2
+            where g2.vehicle_id = g.vehicle_id
+        )
+    </delete>
 </mapper> 
\ No newline at end of file

--
Gitblit v1.9.1