1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package cn.flightfeather.supervision.domain.ds1.repository
 
import cn.flightfeather.supervision.domain.ds1.entity.Scense
import cn.flightfeather.supervision.domain.ds1.entity.Userinfo
import cn.flightfeather.supervision.domain.ds1.mapper.UserinfoMapper
import org.springframework.stereotype.Repository
import tk.mybatis.mapper.entity.Example
 
/**
 * 飞羽监管用户信息数据库相关操作
 */
@Repository
class UserInfoSVRep(
    private val userinfoMapper: UserinfoMapper,
) {
 
    /**
     * 查找场景
     */
    fun findUser(sceneIdList: List<String?>): List<Userinfo?> {
        return userinfoMapper.selectByExample(Example(Userinfo::class.java).apply {
            createCriteria().andIn("dGuid", sceneIdList)
        })
    }
 
    fun findUser(sceneId: String): List<Userinfo?> {
        return userinfoMapper.selectByExample(Example(Userinfo::class.java).apply {
            createCriteria().andEqualTo("dGuid", sceneId)
        })
    }
}