From 8c189b243bfbbacb2ab1ce79f4e1ff22708f125a Mon Sep 17 00:00:00 2001 From: whycxzp <perryhsu@163.com> Date: 星期一, 26 七月 2021 16:45:09 +0800 Subject: [PATCH] 修复接口 --- src/main/java/com/whyc/controller/CentralMonitorSysRTController.java | 28 +++++++++++++++++++++++----- 1 files changed, 23 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/whyc/controller/CentralMonitorSysRTController.java b/src/main/java/com/whyc/controller/CentralMonitorSysRTController.java index 04e32b1..40fbadb 100644 --- a/src/main/java/com/whyc/controller/CentralMonitorSysRTController.java +++ b/src/main/java/com/whyc/controller/CentralMonitorSysRTController.java @@ -9,15 +9,15 @@ 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; +import java.util.Map; @RequestMapping("centralMonitorSys") @RestController -@Api(tags = "闆嗕腑鐩戞帶绯荤粺-杩涘嚭绾垮睆鐨勭姸鎬�/鏁版嵁淇℃伅") +@Api(tags = "闆嗕腑鐩戞帶绯荤粺-杩涘嚭绾垮睆鐨勭姸鎬佸強鏁版嵁淇℃伅") public class CentralMonitorSysRTController { @Autowired @@ -29,6 +29,24 @@ return service.getInfoByDevId(devId); } + @GetMapping("inField") + @ApiOperation(value = "鏌ヨ鍛婅闃堝�煎瓧娈�-杩涚嚎灞�") + public Response<Map<String,List>> getInField(){ + return service.getInField(); + } + + @GetMapping("outField") + @ApiOperation(value = "鏌ヨ鍛婅闃堝�煎瓧娈�-鍑虹嚎灞�") + public Response<Map<String,List>> getOutField(){ + return service.getOutField(); + } + + @PutMapping("updateState") + @ApiOperation(value = "鏇存柊鐘舵��-婕旂ず浣跨敤") + public Response updateState(@RequestParam int devId,@RequestParam int switchClose){ + return service.updateState(devId,switchClose); + } + /** * ======History====== * 鍘嗗彶鏌ヨ鏃�,鍥犱负鍘嗗彶璁板綍鏄寜鐓ф棩鏈熷垎琛ㄧ殑,濡傛灉鏌ヨ鎵�鏈夌殑鏃ユ湡琛�(union)鍚庡啀鍒嗛〉,浼氬鑷撮�熷害鏋佹參,鏁呮煡璇㈡寜鐓у崟涓棩鏈熸煡璇� -- Gitblit v1.9.1