From 7d74f3fd087d4a8192ed556a6c2e3a2ea3c81cff Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期五, 28 三月 2025 17:43:48 +0800 Subject: [PATCH] 1. 新增扬尘监测数据上传功能 --- src/main/kotlin/cn/flightfeather/supervision/business/autooutput/AopOutput.kt | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/AopOutput.kt b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/AopOutput.kt index a285f4b..396b6bc 100644 --- a/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/AopOutput.kt +++ b/src/main/kotlin/cn/flightfeather/supervision/business/autooutput/AopOutput.kt @@ -8,6 +8,7 @@ import cn.flightfeather.supervision.domain.ds1.mapper.EvaluationMapper import cn.flightfeather.supervision.domain.ds1.mapper.ItemevaluationMapper import org.springframework.stereotype.Component +import org.springframework.transaction.annotation.Transactional import tk.mybatis.mapper.entity.Example /** @@ -23,6 +24,7 @@ /** * 灏嗚瘎鍒嗚褰曡緭鍑鸿嚦鏁版嵁搴� */ + @Transactional fun toDbEvaluation(evaluationScene: AopDataSource.EvaluationScene, p: Pair<Evaluation, List<Itemevaluation>>) { //鍘婚櫎宸叉湁璁板綍 evaluationMapper.deleteByExample(Example(Evaluation::class.java).apply { @@ -40,6 +42,7 @@ /** * 灏嗚瘎鍒嗚褰曟洿鏂拌嚦鏁版嵁搴� */ + @Transactional fun updateDbEvaluation(evaluationScene: AopDataSource.EvaluationScene, p: Pair<Evaluation, List<Itemevaluation>>) { evaluationMapper.updateByPrimaryKey(p.first) p.second.forEach { il -> itemevaluationMapper.updateByPrimaryKey(il) } -- Gitblit v1.9.3