From d171a948a49799c38de7b9f338f67d3f2b1e3175 Mon Sep 17 00:00:00 2001 From: luodangjia <luodangjia> Date: 星期二, 20 八月 2024 18:05:32 +0800 Subject: [PATCH] 8.21 --- ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/SiteController.java | 18 +++++++++++++++--- 1 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/SiteController.java b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/SiteController.java index 011fff5..24374de 100644 --- a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/SiteController.java +++ b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/SiteController.java @@ -156,11 +156,23 @@ @ResponseBody - @PostMapping("/getSiteList") + @PostMapping("/addSite") @ApiOperation(value = "添加站点", tags = {"管理后台-站点管理"}) public AjaxResult addSite(@RequestBody Site site){ return siteService.addSite(site); } + + + + @ResponseBody + @PostMapping("/getSiteInfo") + @ApiOperation(value = "获取站点详情", tags = {"管理后台-站点管理"}) + public AjaxResult<Site> getSiteInfo(@PathVariable Integer id){ + Site site = siteService.getById(id); + return AjaxResult.success(site); + } + + @ResponseBody @PostMapping("/editSite") @@ -170,12 +182,12 @@ } @ResponseBody - @DeleteMapping("/delSite/{id}") + @DeleteMapping("/delSite") @ApiOperation(value = "删除站点", tags = {"管理后台-站点管理"}) @ApiImplicitParams({ @ApiImplicitParam(value = "站点id", name = "id", dataTypeClass = Integer.class, required = true) }) - public AjaxResult delSite(@PathVariable Integer[] id){ + public AjaxResult delSite(@RequestParam("id") Integer[] id){ return siteService.delSite(id); } -- Gitblit v1.7.1