feiyu02
2024-09-25 0516cba27e632f20efac2752787f38f0c87baafa
src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/SceneRep.kt
@@ -26,13 +26,6 @@
        return scenseMapper.insertSelective(scene)
    }
    /**
     * 查找场景
     */
    fun findScene(topTaskId: String, sceneTypeId: Int? = null, townCode: String? = null): List<Scense?> {
        return scenseMapper.getSceneByType(topTaskId, sceneTypeId, townCode)
    }
    fun findScene(userId: String?): Scense? {
        val user = userinfoMapper.selectByPrimaryKey(userId) ?: throw BizException("用户id不存在")
        return scenseMapper.selectByPrimaryKey(user.dGuid)
@@ -45,12 +38,19 @@
        })
    }
    fun findScenes(nameList: List<String?>): List<Scense?> {
    fun findSceneList(nameList: List<String?>): List<Scense?> {
        return scenseMapper.selectByExample(Example(Scense::class.java).apply {
            createCriteria().andIn("name", nameList)
        })
    }
    /**
     * 查找场景
     */
    fun findSceneList(topTaskId: String, sceneTypeId: Int? = null, townCode: String? = null): List<Scense?> {
        return scenseMapper.getSceneByType(topTaskId, sceneTypeId, townCode)
    }
    fun findBySubTask(subTaskId: String): Scense? {
        val subtask = subTaskRep.findOne(subTaskId)
        return scenseMapper.selectByPrimaryKey(subtask?.scenseid)