From 84569abda51ecf6c5549dec4cadee8d043422379 Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期二, 30 九月 2025 09:33:28 +0800 Subject: [PATCH] 2025.9.30 --- src/main/kotlin/com/flightfeather/grid/service/impl/ClueConclusionServiceImpl.kt | 31 ++++++++++++++++++------------- 1 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/main/kotlin/com/flightfeather/grid/service/impl/ClueConclusionServiceImpl.kt b/src/main/kotlin/com/flightfeather/grid/service/impl/ClueConclusionServiceImpl.kt index be47c4c..e301854 100644 --- a/src/main/kotlin/com/flightfeather/grid/service/impl/ClueConclusionServiceImpl.kt +++ b/src/main/kotlin/com/flightfeather/grid/service/impl/ClueConclusionServiceImpl.kt @@ -24,23 +24,28 @@ clueConclusion.ccUploaded = false clueConclusion.ccCreateTime = Date() if (clueConclusion.ccInternal == null) clueConclusion.ccInternal = false + val conclusion: ClueConclusion? try { - val conclusion = clueConclusionMapper.selectOne(ClueConclusion().apply { cId = clueConclusion.cId }) - // 鏇存柊 - return if (conclusion != null) { - if (conclusion.ccUploaded) throw BizException("绾跨储缁撹宸叉帹閫侊紝鏃犳硶淇敼") - clueConclusion.ccId = conclusion.ccId - val res = clueConclusionMapper.updateByPrimaryKeySelective(clueConclusion) - res == 1 - } - // 鎻掑叆 - else { - val res = clueConclusionMapper.insert(clueConclusion) - res == 1 - } + conclusion = clueConclusionMapper.selectOne(ClueConclusion().apply { + cId = clueConclusion.cId + ccInternal = clueConclusion.ccInternal + }) } catch (e: Exception) { throw BizException("姣忔潯绾跨储鏈�澶氳兘鏈変竴鏉$粨璁猴紝璇ョ嚎绱㈢粨璁哄瓨鍦ㄥ鏉★紝璇锋鏌ョ郴缁熼�昏緫") } + // 鏇存柊 + return if (conclusion != null) { + if (conclusion.ccUploaded) throw BizException("绾跨储缁撹宸叉帹閫侊紝鏃犳硶淇敼") + clueConclusion.ccId = conclusion.ccId + val res = clueConclusionMapper.updateByPrimaryKeySelective(clueConclusion) + res == 1 + } + // 鎻掑叆 + else { + val res = clueConclusionMapper.insert(clueConclusion) + res == 1 + } + } override fun getClueConclusion(clueId: String, internal: Boolean?): ClueConclusion? { -- Gitblit v1.9.3