Browse Source

Merge branch 'han' of uskycloud/usky-modules into server-165

fuyuchuan 1 day ago
parent
commit
585bb5f0b0

+ 8 - 3
service-iot/service-iot-biz/src/main/java/com/usky/iot/controller/web/BaseScreenController.java

@@ -71,9 +71,14 @@ public class BaseScreenController {
      * @param id
      * @return
      */
-    @DeleteMapping("/remove")
-    public ApiResult<Void> remove(@RequestParam("id") Integer id) {
-        return baseScreenService.removeById(id) ? ApiResult.success() : ApiResult.error("删除失败!");
+    @Log(title = "删除大屏", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{id}")
+    public ApiResult<Void> remove(@PathVariable("id") Integer id) {
+        try {
+            return baseScreenService.removeById(id) ? ApiResult.success() : ApiResult.error("删除失败!");
+        } catch (Exception e) {
+            return ApiResult.error("删除失败:" + e.getMessage());
+        }
     }
 }