From 698f8f0f22af4c66581ce284407e986ca036aec6 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期四, 23 一月 2025 17:10:26 +0800
Subject: [PATCH] 1. 网格细分逻辑(编写中)

---
 src/main/kotlin/com/flightfeather/uav/domain/repository/SatelliteGridRep.kt |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/src/main/kotlin/com/flightfeather/uav/domain/repository/SatelliteGridRep.kt b/src/main/kotlin/com/flightfeather/uav/domain/repository/SatelliteGridRep.kt
index b88bc35..4c35033 100644
--- a/src/main/kotlin/com/flightfeather/uav/domain/repository/SatelliteGridRep.kt
+++ b/src/main/kotlin/com/flightfeather/uav/domain/repository/SatelliteGridRep.kt
@@ -9,6 +9,7 @@
 import com.flightfeather.uav.domain.mapper.GridGroupMapper
 import com.flightfeather.uav.lightshare.bean.AreaVo
 import org.springframework.stereotype.Repository
+import org.springframework.transaction.annotation.Transactional
 import tk.mybatis.mapper.entity.Example
 import java.time.LocalDateTime
 
@@ -37,6 +38,14 @@
         })
     }
 
+    fun fetchGridGroup(id: Int): GridGroup? {
+        return gridGroupMapper.selectByPrimaryKey(id)
+    }
+
+    fun fetchGridGroup(gridGroup: GridGroup): List<GridGroup?> {
+        return gridGroupMapper.select(gridGroup)
+    }
+
     fun fetchGridCell(groupId: Int): List<GridCell?> {
         return gridCellMapper.selectByExample(Example(GridCell::class.java).apply {
             createCriteria().andEqualTo("groupId", groupId)
@@ -50,6 +59,10 @@
                 .andEqualTo("dataTime", dataTime)
                 .andEqualTo("type", type)
         })
+    }
+
+    fun fetchGridData(gridData: GridData): List<GridData?> {
+        return gridDataMapper.select(gridData)
     }
 
     fun fetchGridDataDetail(dataId: Int, groupId: Int?, cellId: Int?): List<GridDataDetail?> {
@@ -109,7 +122,11 @@
                     .andEqualTo("cellId", it.cellId)
             })
         }
+    }
 
+    @Transactional
+    fun updateGridCellBatch(gridCellList: List<GridCell?>) {
+        gridCellList.forEach { gridCellMapper.updateByPrimaryKey(it) }
     }
 
 }
\ No newline at end of file

--
Gitblit v1.9.3