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/lightshare/service/impl/UserinfoServiceImpl.kt |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/UserinfoServiceImpl.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/UserinfoServiceImpl.kt
index 9b20267..4436197 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/UserinfoServiceImpl.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/UserinfoServiceImpl.kt
@@ -7,13 +7,13 @@
 import cn.flightfeather.supervision.domain.ds1.entity.Userinfo
 import cn.flightfeather.supervision.domain.ds1.mapper.ScenseMapper
 import cn.flightfeather.supervision.domain.ds1.mapper.UserinfoMapper
-import cn.flightfeather.supervision.domain.ds1.repository.SceneRep
-import cn.flightfeather.supervision.domain.ds1.repository.TaskRep
 import cn.flightfeather.supervision.domain.ds1.repository.UserInfoSVRep
 import cn.flightfeather.supervision.domain.ds2.entity.UserinfoTZ
 import cn.flightfeather.supervision.domain.ds2.repository.UserInfoTZRep
 import cn.flightfeather.supervision.lightshare.service.UserinfoService
 import cn.flightfeather.supervision.lightshare.vo.AreaVo
+import cn.flightfeather.supervision.lightshare.vo.DataHead
+import com.github.pagehelper.PageHelper
 import org.springframework.beans.BeanUtils
 import org.springframework.stereotype.Service
 import tk.mybatis.mapper.entity.Example
@@ -45,9 +45,12 @@
         }
     }
 
-    override fun findByType(typeId: Byte): List<Userinfo> {
+    override fun findByType(typeId: Byte, enable: Boolean?): List<Userinfo> {
         val result = userinfoMapper.selectByExample(Example(Userinfo::class.java).apply {
             createCriteria().andEqualTo("usertypeid", typeId)
+                .apply {
+                    enable?.let { andEqualTo("isenable", it) }
+                }
         })
 
         return result
@@ -69,6 +72,14 @@
 
     override fun delete(id: String): Int = userinfoMapper.deleteByPrimaryKey(id)
 
+    override fun search(areaVo: AreaVo, keyword: String, userType: Int?, page: Int?, perPage: Int?)
+            : Pair<DataHead, List<Userinfo?>> {
+        val p = PageHelper.startPage<Userinfo>(page ?: 1, perPage ?: 30)
+        val result = userInfoSVRep.searchUser(areaVo, keyword.trim(), Constant.UserType.fromValue(userType))
+        result.forEach { it?.password = null }
+        return DataHead(p.pageNum, p.pages, p.total) to result
+    }
+
     override fun createAccount(sceneId: String): Userinfo {
         findByScene(sceneId)?.let { return it }
 

--
Gitblit v1.9.3