From baf2cc2ce3dfd1235c012a3750132769fcd9ad2f Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期四, 18 九月 2025 17:02:05 +0800
Subject: [PATCH] 2025.9.18 1. 联合前端调试数据产品接口(待完成)

---
 src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/NightConstructionImpl.kt |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/NightConstructionImpl.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/NightConstructionImpl.kt
index 12ad943..4da12af 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/NightConstructionImpl.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/NightConstructionImpl.kt
@@ -1,5 +1,6 @@
 package cn.flightfeather.supervision.lightshare.service.impl
 
+import cn.flightfeather.supervision.common.exception.BizException
 import cn.flightfeather.supervision.domain.ds1.entity.NightConstruction
 import cn.flightfeather.supervision.domain.ds1.mapper.NightConstructionMapper
 import cn.flightfeather.supervision.domain.ds1.mapper.UserinfoMapper
@@ -24,7 +25,7 @@
                     .andEqualTo("ncDistrictCode", districtCode)
             orderBy("ncRead").orderBy("ncId").desc()
         })
-        return BaseResponse(true, head = DataHead(p.pageNum, p.pages), data = result)
+        return BaseResponse(true, head = DataHead(p.pageNum, p.pages, p.total), data = result)
     }
 
     override fun getNightWorkFile(userId: String, isRead: Boolean?, page: Int, perPage: Int): BaseResponse<List<NightConstruction?>> {
@@ -64,6 +65,14 @@
         }
     }
 
+    override fun updateRecord(recordId: Int, userId: String?, sceneId: String?): NightConstruction {
+        val record = nightConstructionMapper.selectByPrimaryKey(recordId) ?: throw BizException("澶滈棿璁稿彲璇佽褰曚笉瀛樺湪")
+        record.ncUserId = userId
+        record.ncSceneId = sceneId
+        nightConstructionMapper.updateByPrimaryKey(record)
+        return record
+    }
+
     override fun getSummary(cityCode: String?, districtCode: String): BaseResponse<NightWorkSummary> {
         val total = nightConstructionMapper.selectCountByExample(Example(NightConstruction::class.java).apply {
             createCriteria().andEqualTo("ncCityCode", cityCode ?: "3100")

--
Gitblit v1.9.3