From 82baf5d28ce79aa4d3b64956207d247596726924 Mon Sep 17 00:00:00 2001
From: hcong <1050828145@qq.com>
Date: 星期二, 10 十二月 2024 11:21:33 +0800
Subject: [PATCH] 1. BgTaskStatus状态属性序列化
---
src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DeviceController.kt | 20 +++++++++++++++++---
1 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DeviceController.kt b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DeviceController.kt
index 6080ea0..96e94e5 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DeviceController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DeviceController.kt
@@ -3,6 +3,7 @@
import cn.flightfeather.supervision.common.utils.Constant
import cn.flightfeather.supervision.domain.ds1.entity.MonitorDeviceInfo
import cn.flightfeather.supervision.lightshare.service.DeviceService
+import cn.flightfeather.supervision.lightshare.vo.AreaVo
import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
import io.swagger.annotations.ApiParam
@@ -18,7 +19,7 @@
@GetMapping
fun fetchDevice(
@ApiParam("鍦烘櫙id") @RequestParam sceneId: String,
- @ApiParam("璁惧绫诲瀷id") @RequestParam deviceTypeId: Byte,
+ @ApiParam("璁惧绫诲瀷id", allowableValues = "0,1,2") @RequestParam deviceTypeId: Byte,
) = resPack { deviceService.findDevices(sceneId, Constant.DeviceType.fromValue(deviceTypeId)) }
@ApiOperation("鏂板鍦烘櫙璁惧淇℃伅")
@@ -44,17 +45,30 @@
) = resPack { deviceService.findDeviceLocations(sceneId, deviceId, Constant.DeviceType.fromValue(deviceTypeId)) }
@ApiOperation("鏂板鍦烘櫙璁惧浣嶇疆鍙樻洿淇℃伅")
- @PutMapping("/status/upload")
+ @PostMapping("/status/upload")
fun uploadDeviceLocation(
@ApiParam("璁惧浣嶇疆淇℃伅json") @RequestParam("status") status: String,
@ApiParam("璁惧鍥剧墖") @RequestPart("images") images: Array<MultipartFile>,
) = resPack { deviceService.insertDeviceLocation(status, images) }
@ApiOperation("鏇存柊鍦烘櫙璁惧浣嶇疆鍙樻洿淇℃伅")
- @PutMapping("/status/update")
+ @PostMapping("/status/update")
fun updateDeviceLocation(
@ApiParam("璁惧浣嶇疆淇℃伅json") @RequestParam("status") status: String,
@ApiParam("鍒犻櫎鐨勮澶囧浘鐗囪矾寰�") @RequestParam("deleteImg") deleteImg: List<String>,
@ApiParam("璁惧鍥剧墖") @RequestPart("images") images: Array<MultipartFile>,
) = resPack { deviceService.updateDeviceLocation(status, deleteImg, images) }
+
+ @ApiOperation("鏌ヨ浠庡閮ㄨ幏鍙栫殑璁惧淇℃伅")
+ @PostMapping("/external/search")
+ fun searchExternalDevice(
+ @ApiParam("鍖哄煙鏉′欢淇℃伅") @RequestBody
+ areaVo: AreaVo,
+ @ApiParam("鎼滅储鍏抽敭瀛楋紝鍖归厤璁惧缂栧彿鍜岀偣浣嶅悕绉�") @RequestParam
+ keyword: String,
+ @ApiParam("鏌ヨ椤电爜", defaultValue = "1", required = false) @RequestParam("page", required = false)
+ page: Int?,
+ @ApiParam("鍗曢〉鏁版嵁閲�", defaultValue = "30", required = false) @RequestParam("per_page", required = false)
+ perPage: Int?,
+ ) = resPack { deviceService.searchExternalDevice(areaVo, keyword, page, perPage) }
}
\ No newline at end of file
--
Gitblit v1.9.3