| | |
| | | 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) |
| | |
| | | }) |
| | | } |
| | | |
| | | 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) |