feiyu02
2025-07-23 517296b16b1faf07bc389809387b1937f9415746
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/UserMapController.kt
@@ -4,6 +4,7 @@
import cn.flightfeather.supervision.lightshare.vo.AreaVo
import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
import io.swagger.annotations.ApiParam
import org.springframework.web.bind.annotation.*
@Api(tags = ["UserMapController"], description = "用户id对应API接口")
@@ -13,9 +14,20 @@
    @ApiOperation(value = "根据飞羽监管系统中的场景id,获取与飞羽环境系统中的关联用户")
    @GetMapping
    fun getTZId(@RequestParam("sceneId") sceneId: String) = userMapService.getTZIdBySceneId(sceneId)
    fun getTZId(@RequestParam sceneId: String) = userMapService.getTZIdBySceneId(sceneId)
    @ApiOperation(value = "根据飞羽环境系统中的用户id,获取与飞羽监管系统中的关联用户")
    @GetMapping("/scene")
    fun getSceneByTzId(@RequestParam tzUserId: String) = userMapService.getSceneByTZId(tzUserId)
    @ApiOperation(value = "获取区域用户的监测设备和飞羽监管系统、飞羽环境系统的匹配记录")
    @PostMapping("/device")
    fun fetchDeviceMap(@RequestBody areaVo: AreaVo) = resPack { userMapService.fetchDeviceMap(areaVo) }
    fun fetchDeviceMap(
        @ApiParam("查询页码", defaultValue = "1", required = false) @RequestParam("page", required = false)
        page: Int?,
        @ApiParam("单页数据量", defaultValue = "30", required = false) @RequestParam("per_page", required = false)
        perPage: Int?,
        @ApiParam("区域条件信息") @RequestBody
        areaVo: AreaVo
    ) = resPack { userMapService.fetchDeviceMap(page, perPage, areaVo) }
}