feiyu02
2024-01-10 30a53b41f09d2eefd33513a409d472c2166ba1ea
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/UserMapController.kt
@@ -1,14 +1,21 @@
package cn.flightfeather.supervision.lightshare.web
import cn.flightfeather.supervision.lightshare.service.UserMapService
import cn.flightfeather.supervision.lightshare.vo.AreaVo
import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
import org.springframework.web.bind.annotation.*
@Api(tags = ["VersionController"], description = "用户id对应API接口")
@Api(tags = ["UserMapController"], description = "用户id对应API接口")
@RestController
@RequestMapping("/usermap")
class UserMapController(val userMapService: UserMapService) {
    @ApiOperation(value = "根据飞羽监管系统中的场景id,获取与飞羽环境系统中的关联用户")
    @GetMapping
    fun getTZId(@RequestParam("sceneId") sceneId: String) = userMapService.getTZIdBySceneId(sceneId)
    @ApiOperation(value = "获取区域用户的监测设备和飞羽监管系统、飞羽环境系统的匹配记录")
    @PostMapping("/device")
    fun fetchDeviceMap(@RequestBody areaVo: AreaVo) = resPack { userMapService.fetchDeviceMap(areaVo) }
}