| | |
| | | import io.swagger.annotations.ApiImplicitParam |
| | | import io.swagger.annotations.ApiOperation |
| | | import org.springframework.web.bind.annotation.* |
| | | import org.springframework.web.multipart.MultipartFile |
| | | |
| | | @Api(tags = ["ScenseController"], description = "监管场景API接口") |
| | | @RestController |
| | |
| | | @RequestParam("lat") lat: Double, |
| | | @RequestParam("radius") radius: Double, |
| | | ) = resPack { scenseService.searchByCoordinate(lng, lat, radius) } |
| | | |
| | | @ApiOperation(value = "通过文件导入场景信息") |
| | | @PostMapping("/import") |
| | | fun importSceneInfo( |
| | | @RequestPart("file") files: Array<MultipartFile>, |
| | | ) = resPack { scenseService.importSceneInfo(files) } |
| | | |
| | | @ApiOperation(value = "创建场景信息") |
| | | @PutMapping("/create") |
| | | fun createScene( |
| | | @RequestBody scense: Scense |
| | | ) = resPack { scenseService.createScene(scense) } |
| | | } |