From e923f06d572c9a0e3b1eb2c54471af02c9d95bcf Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期四, 18 十二月 2025 10:05:05 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/main/kotlin/com/flightfeather/uav/domain/repository/RealTimeDataRepDelegate.kt | 26 ++++++++++++++++++++++++++
1 files changed, 26 insertions(+), 0 deletions(-)
diff --git a/src/main/kotlin/com/flightfeather/uav/domain/repository/RealTimeDataRepDelegate.kt b/src/main/kotlin/com/flightfeather/uav/domain/repository/RealTimeDataRepDelegate.kt
index 8ce8813..3628b1b 100644
--- a/src/main/kotlin/com/flightfeather/uav/domain/repository/RealTimeDataRepDelegate.kt
+++ b/src/main/kotlin/com/flightfeather/uav/domain/repository/RealTimeDataRepDelegate.kt
@@ -89,6 +89,32 @@
}
/**
+ * 缁熶竴鐨剈pdate鏂规硶
+ * @param deviceType 璁惧绫诲瀷
+ * @param type 鏁版嵁缁熻鍛ㄦ湡锛�0锛氱绾у�硷紱1锛氬垎閽熷��
+ * @param data 鏁版嵁
+ */
+ fun updateByDeviceType(deviceType: UWDeviceType?, type: Int? = 0, data: List<BaseRealTimeData>): Int {
+ return byDeviceType(deviceType, type, {
+ var count = 0
+ data.forEach { count += realTimeDataVehicleMapper.updateByPrimaryKeySelective(it as RealTimeDataVehicle) }
+ count
+ }, {
+ var count = 0
+ data.forEach { count += realTimeDataUavMapper.updateByPrimaryKeySelective(it as RealTimeDataUav) }
+ count
+ }, {
+ var count = 0
+ data.forEach { count += realTimeDataGridMapper.updateByPrimaryKeySelective(it as RealTimeDataGrid) }
+ count
+ }, {
+ var count = 0
+ data.forEach { count += realTimeDataGridMinMapper.updateByPrimaryKeySelective(it as RealTimeDataGridMin) }
+ count
+ }) ?: 0
+ }
+
+ /**
* 缁熶竴鐨刣elete鏂规硶
* @param deviceType 璁惧绫诲瀷
* @param type 鏁版嵁缁熻鍛ㄦ湡锛�0锛氱绾у�硷紱1锛氬垎閽熷��
--
Gitblit v1.9.3