From af8cab142a6b15c06e131a8474574dd5b00df982 Mon Sep 17 00:00:00 2001
From: wlzboy <66905212@qq.com>
Date: 星期四, 04 十二月 2025 22:09:58 +0800
Subject: [PATCH] feat: 改造微信accesstoken存放在系统配置表中
---
ruoyi-system/src/main/resources/mapper/system/VehicleMileageStatsMapper.xml | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/ruoyi-system/src/main/resources/mapper/system/VehicleMileageStatsMapper.xml b/ruoyi-system/src/main/resources/mapper/system/VehicleMileageStatsMapper.xml
index 4179acf..aee4324 100644
--- a/ruoyi-system/src/main/resources/mapper/system/VehicleMileageStatsMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/VehicleMileageStatsMapper.xml
@@ -83,7 +83,7 @@
s.non_task_mileage, s.task_ratio, s.gps_point_count, s.task_count, s.segment_count,
s.data_source, s.create_time, s.update_time
from tb_vehicle_mileage_stats s
- where s.vehicle_id = #{vehicleId} and s.stat_date = #{statDate}
+ where s.vehicle_id = #{vehicleId} and DATE(s.stat_date) = DATE(#{statDate})
limit 1
</select>
@@ -130,6 +130,17 @@
<if test="dataSource != null">#{dataSource},</if>
NOW()
</trim>
+ ON DUPLICATE KEY UPDATE
+ vehicle_no = VALUES(vehicle_no),
+ total_mileage = VALUES(total_mileage),
+ task_mileage = VALUES(task_mileage),
+ non_task_mileage = VALUES(non_task_mileage),
+ task_ratio = VALUES(task_ratio),
+ gps_point_count = VALUES(gps_point_count),
+ task_count = VALUES(task_count),
+ segment_count = VALUES(segment_count),
+ data_source = VALUES(data_source),
+ update_time = NOW()
</insert>
<update id="updateVehicleMileageStats" parameterType="VehicleMileageStats">
--
Gitblit v1.9.1