Lawrence
2020-12-17 8a82a71ded7459549e0c3448944fef97239e8fcb
增加本平台配置查询接口,方便上级级联参数填写
1个文件已修改
16 ■■■■■ 已修改文件
src/main/java/com/genersoft/iot/vmp/vmanager/platform/PlatformController.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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.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 @@
    @Autowired
    private ISIPCommanderForPlatform commanderForPlatform;
    @Autowired
    private SipConfig sipConfig;
    @GetMapping("/platforms/serverconfig")
    public ResponseEntity<JSONObject> 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<ParentPlatform> platforms(@PathVariable int page, @PathVariable int count){