From 1a677d2b4a4bc615602f8c2a22bc07ec1356e5be Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期四, 16 十月 2025 17:39:06 +0800
Subject: [PATCH] 2025.10.16 1. 根据全局响应增强器GlobalResponseAdvice,将原先的BaseResPack接口包装函数统一去除; 2. 新增三种类型的数据产品数据库实体 3. 新增典型问题场景清单中间数据产品接口
---
src/main/kotlin/cn/flightfeather/supervision/domain/ds3/repository/JSDustSiteRep.kt | 35 +++++++++++++++++++++++++++++++++++
1 files changed, 35 insertions(+), 0 deletions(-)
diff --git a/src/main/kotlin/cn/flightfeather/supervision/domain/ds3/repository/JSDustSiteRep.kt b/src/main/kotlin/cn/flightfeather/supervision/domain/ds3/repository/JSDustSiteRep.kt
index 13684fe..5ac1b36 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/domain/ds3/repository/JSDustSiteRep.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/domain/ds3/repository/JSDustSiteRep.kt
@@ -1,5 +1,6 @@
package cn.flightfeather.supervision.domain.ds3.repository
+import cn.flightfeather.supervision.domain.ds3.entity.JSDustSiteInfo
import cn.flightfeather.supervision.domain.ds3.entity.JSDustSiteMap
import cn.flightfeather.supervision.domain.ds3.mapper.JSDustSiteInfoMapper
import cn.flightfeather.supervision.domain.ds3.mapper.JSDustSiteMapMapper
@@ -7,6 +8,7 @@
import cn.flightfeather.supervision.lightshare.vo.DeviceSiteVo
import org.springframework.stereotype.Repository
import tk.mybatis.mapper.entity.Example
+import java.util.*
/**
* 閲戝北鎵皹鐩戞祴鐐逛綅鍜岀郴缁熺敤鎴锋槧灏勫叧绯绘暟鎹簱鐩稿叧鎿嶄綔
@@ -37,4 +39,37 @@
val res = jsDustSiteInfoMapper.selectAll()
return DeviceSiteVo.fromJSDustSiteInfo(res)
}
+
+ fun searchSiteInfo(keyword: String): List<DeviceSiteVo> {
+ val res = jsDustSiteInfoMapper.selectByExample(Example(JSDustSiteInfo::class.java).apply {
+ createCriteria().andLike("name", "%$keyword%")
+ })
+ return DeviceSiteVo.fromJSDustSiteInfo(res)
+ }
+
+ /**
+ * 鏍规嵁id鏌ヨ
+ */
+ fun findByPrimaryKey(id: Int?): JSDustSiteMap? {
+ if (id == null) {
+ return null
+ }
+ return jsDustSiteMapMapper.selectByPrimaryKey(id)
+ }
+
+ /**
+ * 鏂板
+ */
+ fun insert(jsDustSiteMap: JSDustSiteMap): Int {
+ jsDustSiteMap.createTime = Date()
+ return jsDustSiteMapMapper.insert(jsDustSiteMap)
+ }
+
+ /**
+ * 鏇存柊
+ */
+ fun update(jsDustSiteMap: JSDustSiteMap): Int {
+ jsDustSiteMap.createTime = Date()
+ return jsDustSiteMapMapper.updateByPrimaryKeySelective(jsDustSiteMap)
+ }
}
\ No newline at end of file
--
Gitblit v1.9.3