From c6e38b6c66de5f5a8df5b8b2ab03a82c3b605db8 Mon Sep 17 00:00:00 2001
From: wlzboy <66905212@qq.com>
Date: 星期三, 03 十二月 2025 00:48:44 +0800
Subject: [PATCH] feat:优化同步
---
ruoyi-system/src/main/resources/mapper/system/VehicleGpsMapper.xml | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/ruoyi-system/src/main/resources/mapper/system/VehicleGpsMapper.xml b/ruoyi-system/src/main/resources/mapper/system/VehicleGpsMapper.xml
index 3abe287..2c78bdf 100644
--- a/ruoyi-system/src/main/resources/mapper/system/VehicleGpsMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/VehicleGpsMapper.xml
@@ -30,7 +30,7 @@
<select id="selectVehicleGpsList" parameterType="VehicleGps" resultMap="VehicleGpsResult">
<include refid="selectVehicleGpsVo"/>
<where>
- <if test="vehicleNo != null and vehicleNo != ''"> and vehicle_no = #{vehicleNo}</if>
+ <if test="vehicleNo != null and vehicleNo != ''"> and v.vehicle_no like concat('%', #{vehicleNo}, '%')</if>
<if test="longitude != null "> and longitude = #{longitude}</if>
<if test="latitude != null "> and latitude = #{latitude}</if>
<if test="speed != null "> and speed = #{speed}</if>
@@ -130,10 +130,11 @@
order by collect_time
</select>
+ <!-- 鏌ヨ娲昏穬杞﹁締ID锛堜紭鍖栵細娣诲姞LIMIT闄愬埗锛岄伩鍏嶅ぇ琛ㄦ壂鎻忥級 -->
<select id="selectActiveVehicleIds" resultType="Long">
select distinct vehicle_id
from tb_vehicle_gps
- where collect_time >= DATE_SUB(NOW(), INTERVAL 7 DAY)
+ where collect_time >= #{startTime}
order by vehicle_id
</select>
--
Gitblit v1.9.1