Commit c785f5b625aa11134c7482e333cae8f627922901
1 parent
6ac7ce8f
规范返回格式
Showing
1 changed file
with
4 additions
and
1 deletions
src/main/java/com/genersoft/iot/vmp/vmanager/play/PlayController.java
| ... | ... | @@ -10,6 +10,7 @@ import org.springframework.web.bind.annotation.PathVariable; |
| 10 | 10 | import org.springframework.web.bind.annotation.RequestMapping; |
| 11 | 11 | import org.springframework.web.bind.annotation.RestController; |
| 12 | 12 | |
| 13 | +import com.alibaba.fastjson.JSONObject; | |
| 13 | 14 | import com.genersoft.iot.vmp.gb28181.bean.Device; |
| 14 | 15 | import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommander; |
| 15 | 16 | import com.genersoft.iot.vmp.storager.IVideoManagerStorager; |
| ... | ... | @@ -38,7 +39,9 @@ public class PlayController { |
| 38 | 39 | } |
| 39 | 40 | |
| 40 | 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 | 45 | } else { |
| 43 | 46 | logger.warn("设备预览API调用失败!"); |
| 44 | 47 | return new ResponseEntity<String>(HttpStatus.INTERNAL_SERVER_ERROR); | ... | ... |