From 956fd47ed60bda6e27ad8bb9f53ba5215973300a Mon Sep 17 00:00:00 2001
From: swwheihei <swwheihei@163.com>
Date: 星期五, 24 七月 2020 10:29:29 +0800
Subject: [PATCH] 修复返回值低级错误

---
 src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java |   64 ++++++++++++++++----------------
 1 files changed, 32 insertions(+), 32 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java
index e4be40b..ae67020 100644
--- a/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java
+++ b/src/main/java/com/genersoft/iot/vmp/media/zlm/ZLMHttpHookListener.java
@@ -18,11 +18,11 @@
 
 /**    
  * @Description:閽堝 ZLMediaServer鐨刪ook浜嬩欢鐩戝惉
- * @author: songww
+ * @author: swwheihei
  * @date:   2020骞�5鏈�8鏃� 涓婂崍10:46:48     
  */
 @RestController
-@RequestMapping("/hook/zlm")
+@RequestMapping("/index/hook")
 public class ZLMHttpHookListener {
 
 	private final static Logger logger = LoggerFactory.getLogger(ZLMHttpHookListener.class);
@@ -45,8 +45,8 @@
 		
 		
 		JSONObject ret = new JSONObject();
-		json.put("code", 0);
-		json.put("msg", "success");
+		ret.put("code", 0);
+		ret.put("msg", "success");
 		return new ResponseEntity<String>(ret.toString(),HttpStatus.OK);
 	}
 	
@@ -64,10 +64,10 @@
 		// TODO Auto-generated method stub
 		
 		JSONObject ret = new JSONObject();
-		json.put("code", 0);
-		json.put("err", "");
-		json.put("path", "");
-		json.put("second", 600);
+		ret.put("code", 0);
+		ret.put("err", "");
+		ret.put("path", "");
+		ret.put("second", 600);
 		return new ResponseEntity<String>(ret.toString(),HttpStatus.OK);
 	}
 	
@@ -85,8 +85,8 @@
 		// TODO Auto-generated method stub
 		
 		JSONObject ret = new JSONObject();
-		json.put("code", 0);
-		json.put("msg", "success");
+		ret.put("code", 0);
+		ret.put("msg", "success");
 		return new ResponseEntity<String>(ret.toString(),HttpStatus.OK);
 	}
 	
@@ -104,11 +104,11 @@
 		// TODO Auto-generated method stub
 		
 		JSONObject ret = new JSONObject();
-		json.put("code", 0);
-		json.put("msg", "success");
-		json.put("enableHls", true);
-		json.put("enableMP4", false);
-		json.put("enableRtxp", true);
+		ret.put("code", 0);
+		ret.put("msg", "success");
+		ret.put("enableHls", true);
+		ret.put("enableMP4", false);
+		ret.put("enableRtxp", true);
 		return new ResponseEntity<String>(ret.toString(),HttpStatus.OK);
 	}
 	
@@ -126,8 +126,8 @@
 		// TODO Auto-generated method stub
 		
 		JSONObject ret = new JSONObject();
-		json.put("code", 0);
-		json.put("msg", "success");
+		ret.put("code", 0);
+		ret.put("msg", "success");
 		return new ResponseEntity<String>(ret.toString(),HttpStatus.OK);
 	}
 	
@@ -145,8 +145,8 @@
 		// TODO Auto-generated method stub
 		
 		JSONObject ret = new JSONObject();
-		json.put("code", 0);
-		json.put("realm", "");
+		ret.put("code", 0);
+		ret.put("realm", "");
 		return new ResponseEntity<String>(ret.toString(),HttpStatus.OK);
 	}
 	
@@ -165,9 +165,9 @@
 		// TODO Auto-generated method stub
 		
 		JSONObject ret = new JSONObject();
-		json.put("code", 0);
-		json.put("encrypted", false);
-		json.put("passwd", "test");
+		ret.put("code", 0);
+		ret.put("encrypted", false);
+		ret.put("passwd", "test");
 		return new ResponseEntity<String>(ret.toString(),HttpStatus.OK);
 	}
 	
@@ -185,8 +185,8 @@
 		// TODO Auto-generated method stub
 		
 		JSONObject ret = new JSONObject();
-		json.put("code", 0);
-		json.put("msg", "success");
+		ret.put("code", 0);
+		ret.put("msg", "success");
 		return new ResponseEntity<String>(ret.toString(),HttpStatus.OK);
 	}
 	
@@ -204,8 +204,8 @@
 		// TODO Auto-generated method stub
 		
 		JSONObject ret = new JSONObject();
-		json.put("code", 0);
-		json.put("msg", "success");
+		ret.put("code", 0);
+		ret.put("msg", "success");
 		return new ResponseEntity<String>(ret.toString(),HttpStatus.OK);
 	}
 	
@@ -228,8 +228,8 @@
 		cmder.streamByeCmd(ssrc);
 		
 		JSONObject ret = new JSONObject();
-		json.put("code", 0);
-		json.put("close", true);
+		ret.put("code", 0);
+		ret.put("close", true);
 		return new ResponseEntity<String>(ret.toString(),HttpStatus.OK);
 	}
 	
@@ -247,8 +247,8 @@
 		// TODO Auto-generated method stub
 		
 		JSONObject ret = new JSONObject();
-		json.put("code", 0);
-		json.put("msg", "success");
+		ret.put("code", 0);
+		ret.put("msg", "success");
 		return new ResponseEntity<String>(ret.toString(),HttpStatus.OK);
 	}
 	
@@ -266,8 +266,8 @@
 		// TODO Auto-generated method stub
 		
 		JSONObject ret = new JSONObject();
-		json.put("code", 0);
-		json.put("msg", "success");
+		ret.put("code", 0);
+		ret.put("msg", "success");
 		return new ResponseEntity<String>(ret.toString(),HttpStatus.OK);
 	}
 }

--
Gitblit v1.8.0