Commit c785f5b625aa11134c7482e333cae8f627922901

Authored by songww
1 parent 6ac7ce8f

规范返回格式

src/main/java/com/genersoft/iot/vmp/vmanager/play/PlayController.java
@@ -10,6 +10,7 @@ import org.springframework.web.bind.annotation.PathVariable; @@ -10,6 +10,7 @@ import org.springframework.web.bind.annotation.PathVariable;
10 import org.springframework.web.bind.annotation.RequestMapping; 10 import org.springframework.web.bind.annotation.RequestMapping;
11 import org.springframework.web.bind.annotation.RestController; 11 import org.springframework.web.bind.annotation.RestController;
12 12
  13 +import com.alibaba.fastjson.JSONObject;
13 import com.genersoft.iot.vmp.gb28181.bean.Device; 14 import com.genersoft.iot.vmp.gb28181.bean.Device;
14 import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommander; 15 import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommander;
15 import com.genersoft.iot.vmp.storager.IVideoManagerStorager; 16 import com.genersoft.iot.vmp.storager.IVideoManagerStorager;
@@ -38,7 +39,9 @@ public class PlayController { @@ -38,7 +39,9 @@ public class PlayController {
38 } 39 }
39 40
40 if(ssrc!=null) { 41 if(ssrc!=null) {
41 - return new ResponseEntity<String>(ssrc,HttpStatus.OK); 42 + JSONObject json = new JSONObject();
  43 + json.put("ssrc", ssrc);
  44 + return new ResponseEntity<String>(json.toString(),HttpStatus.OK);
42 } else { 45 } else {
43 logger.warn("设备预览API调用失败!"); 46 logger.warn("设备预览API调用失败!");
44 return new ResponseEntity<String>(HttpStatus.INTERNAL_SERVER_ERROR); 47 return new ResponseEntity<String>(HttpStatus.INTERNAL_SERVER_ERROR);