hcong
2024-11-19 0674dea7dd0e75199c0c200e6a41070c25677082
src/test/kotlin/cn/flightfeather/supervision/lightshare/service/impl/ScenseServiceImplTest.kt
@@ -2,6 +2,8 @@
import cn.flightfeather.supervision.SupervisionApplication
import cn.flightfeather.supervision.domain.ds1.entity.Scense
import cn.flightfeather.supervision.domain.ds1.repository.SceneRep
import cn.flightfeather.supervision.domain.ds1.repository.UserInfoSVRep
import cn.flightfeather.supervision.lightshare.service.ScenseService
import org.junit.Test
import org.junit.runner.RunWith
@@ -15,6 +17,12 @@
    @Autowired
    lateinit var scenseService: ScenseService
    @Autowired
    lateinit var sceneRep: SceneRep
    @Autowired
    lateinit var userInfoSVRep: UserInfoSVRep
    @Test
    fun getSceneType() {
@@ -33,4 +41,16 @@
        val r = scenseService.search(s)
        println(r)
    }
    @Test
    fun createTZUserInfo() {
        val sId = listOf(
            "9jqhywmfvpgvxrT2"
        )
        sId.forEach {
            val scene = sceneRep.findScene(sceneId = it) ?: return@forEach
            val userInfo = userInfoSVRep.findUser(it) ?: return@forEach
            scenseService.createTZUserInfo(userInfo, scene)
        }
    }
}