From 0516cba27e632f20efac2752787f38f0c87baafa Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期三, 25 九月 2024 09:24:05 +0800
Subject: [PATCH] 1. 新增自动评估添加和更新接口

---
 src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DeviceController.kt |    6 +++---
 1 files changed, 3 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..c20ade5 100644
--- a/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DeviceController.kt
+++ b/src/main/kotlin/cn/flightfeather/supervision/lightshare/web/DeviceController.kt
@@ -18,7 +18,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,14 +44,14 @@
     ) = 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>,

--
Gitblit v1.9.3