From 692bbaae6438be0db27b07538eb526b2689c0a62 Mon Sep 17 00:00:00 2001 From: whycxzp <glperry@163.com> Date: 星期三, 11 六月 2025 17:32:25 +0800 Subject: [PATCH] 告警诊断管理 --- src/main/java/com/whyc/controller/DeviceSpareController.java | 23 +++++++++++++++++++---- 1 files changed, 19 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/whyc/controller/DeviceSpareController.java b/src/main/java/com/whyc/controller/DeviceSpareController.java index 8bc06e3..844bdef 100644 --- a/src/main/java/com/whyc/controller/DeviceSpareController.java +++ b/src/main/java/com/whyc/controller/DeviceSpareController.java @@ -7,10 +7,7 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import java.util.List; @@ -35,4 +32,22 @@ return service.getList(name); } + @PostMapping("add") + @ApiOperation("娣诲姞") + public Response add(@RequestBody DeviceSpare spare) { + return service.add(spare); + } + + @PostMapping("update") + @ApiOperation("淇敼") + public Response update(@RequestBody DeviceSpare spare) { + return service.update(spare); + } + + @PostMapping("delete") + @ApiOperation("鍒犻櫎") + public Response delete(@RequestParam Integer id) { + return service.delete(id); + } + } -- Gitblit v1.9.1