From 8a82a71ded7459549e0c3448944fef97239e8fcb Mon Sep 17 00:00:00 2001 From: Lawrence <1934378145@qq.com> Date: Thu, 17 Dec 2020 14:49:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9C=AC=E5=B9=B3=E5=8F=B0?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3=EF=BC=8C?= =?UTF-8?q?=E6=96=B9=E4=BE=BF=E4=B8=8A=E7=BA=A7=E7=BA=A7=E8=81=94=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E5=A1=AB=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vmanager/platform/PlatformController.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main/java/com/genersoft/iot/vmp/vmanager/platform/PlatformController.java b/src/main/java/com/genersoft/iot/vmp/vmanager/platform/PlatformController.java index 8af7cbfe..a94685e9 100644 --- a/src/main/java/com/genersoft/iot/vmp/vmanager/platform/PlatformController.java +++ b/src/main/java/com/genersoft/iot/vmp/vmanager/platform/PlatformController.java @@ -1,5 +1,6 @@ package com.genersoft.iot.vmp.vmanager.platform; +import com.alibaba.fastjson.JSONObject; import com.genersoft.iot.vmp.common.PageResult; import com.genersoft.iot.vmp.gb28181.bean.Device; import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform; @@ -15,6 +16,8 @@ import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.*; +import com.genersoft.iot.vmp.conf.SipConfig; + @CrossOrigin @RestController @@ -29,6 +32,19 @@ public class PlatformController { @Autowired private ISIPCommanderForPlatform commanderForPlatform; + @Autowired + private SipConfig sipConfig; + + @GetMapping("/platforms/serverconfig") + public ResponseEntity serverConfig() { + JSONObject result = new JSONObject(); + result.put("deviceIp", sipConfig.getSipIp()); + result.put("devicePort", sipConfig.getSipPort()); + result.put("username", sipConfig.getSipId()); + result.put("password", sipConfig.getSipPassword()); + return new ResponseEntity<>(result, HttpStatus.OK); + } + @GetMapping("/platforms/{count}/{page}") public PageResult platforms(@PathVariable int page, @PathVariable int count){