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/SourceTraceRep.kt | 16 +++++++++++++---
1 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/src/main/kotlin/com/flightfeather/uav/domain/repository/SourceTraceRep.kt b/src/main/kotlin/com/flightfeather/uav/domain/repository/SourceTraceRep.kt
index b8c4c4c..f726760 100644
--- a/src/main/kotlin/com/flightfeather/uav/domain/repository/SourceTraceRep.kt
+++ b/src/main/kotlin/com/flightfeather/uav/domain/repository/SourceTraceRep.kt
@@ -99,9 +99,18 @@
return if (res.isEmpty()) null else res[0]
}
- fun fetchList(deviceCode: String, startTime: Date, endTime: Date): List<BaseExceptionResult?> {
- return sourceTraceMsgBlobMapper.selectWithBlob(deviceCode, startTime, endTime)
- .map { stm ->
+ fun fetchList(
+ deviceCode: String,
+ startTime: Date,
+ endTime: Date,
+ msgType: MsgType? = null,
+ ): List<BaseExceptionResult?> {
+ var res = sourceTraceMsgBlobMapper.selectWithBlob(deviceCode, startTime, endTime)
+ if (msgType !== null) {
+ res = res.filter { it?.msgType == msgType.value }
+ }
+
+ return res.map { stm ->
when (stm?.msgType) {
MsgType.PolClue.value,
MsgType.DataChange.value,
@@ -125,6 +134,7 @@
.andGreaterThanOrEqualTo("startTime", mission.startTime)
.andLessThanOrEqualTo("endTime", mission.endTime)
}).map { it?.id }
+ if (idList.isEmpty()) return 0
sourceTraceMsgMapper.deleteByExample(Example(SourceTraceMsg::class.java).apply {
createCriteria().andIn("id", idList)
})
--
Gitblit v1.9.3