Commit 074216e822b77a75615ebdfcc14cf284a692248a
1 parent
cfa1ee3f
回调修改
Showing
1 changed file
with
2 additions
and
6 deletions
src/main/java/com/cnlive/shenhe/utils/AuditPass.java
| @@ -6,7 +6,6 @@ import org.slf4j.LoggerFactory; | @@ -6,7 +6,6 @@ import org.slf4j.LoggerFactory; | ||
| 6 | import org.springframework.beans.factory.annotation.Value; | 6 | import org.springframework.beans.factory.annotation.Value; |
| 7 | import org.springframework.stereotype.Component; | 7 | import org.springframework.stereotype.Component; |
| 8 | 8 | ||
| 9 | -import java.util.HashMap; | ||
| 10 | import java.util.Map; | 9 | import java.util.Map; |
| 11 | 10 | ||
| 12 | /** | 11 | /** |
| @@ -33,16 +32,13 @@ public class AuditPass { | @@ -33,16 +32,13 @@ public class AuditPass { | ||
| 33 | */ | 32 | */ |
| 34 | public JSONObject auditPass(String video_id,int state,String attr_tags,String msg,String callBack){ | 33 | public JSONObject auditPass(String video_id,int state,String attr_tags,String msg,String callBack){ |
| 35 | logger.info("点播回调:video_id:{},state:{},attr_tags:{},msg:{}",video_id,state,attr_tags,msg); | 34 | logger.info("点播回调:video_id:{},state:{},attr_tags:{},msg:{}",video_id,state,attr_tags,msg); |
| 36 | - Map<String, String> paramsMap = new HashMap<>(); | ||
| 37 | JSONObject params = new JSONObject(); | 35 | JSONObject params = new JSONObject(); |
| 38 | params.put("video_id",video_id); | 36 | params.put("video_id",video_id); |
| 39 | params.put("state",state+""); | 37 | params.put("state",state+""); |
| 40 | params.put("attr_tags",attr_tags); | 38 | params.put("attr_tags",attr_tags); |
| 41 | params.put("msg",msg); | 39 | params.put("msg",msg); |
| 42 | - paramsMap.put("params",params.toJSONString()); | ||
| 43 | HttpUtil httpUtil = HttpUtil.init(); | 40 | HttpUtil httpUtil = HttpUtil.init(); |
| 44 | - String URL =callBack+"?platform="+platformKey+"&token="+token; | ||
| 45 | - httpUtil.setParamMap(paramsMap); | 41 | + String URL =callBack+"?platform="+platformKey+"&token="+token+"¶m="+params.toJSONString(); |
| 46 | Map<String, String> post = httpUtil.post(URL); | 42 | Map<String, String> post = httpUtil.post(URL); |
| 47 | return JSONObject.parseObject(post.get("result")); | 43 | return JSONObject.parseObject(post.get("result")); |
| 48 | } | 44 | } |
| @@ -50,7 +46,7 @@ public class AuditPass { | @@ -50,7 +46,7 @@ public class AuditPass { | ||
| 50 | public JSONObject commentPass(JSONObject json,String callBack){ | 46 | public JSONObject commentPass(JSONObject json,String callBack){ |
| 51 | HttpUtil httpUtil = HttpUtil.init(); | 47 | HttpUtil httpUtil = HttpUtil.init(); |
| 52 | httpUtil.setStringParam(json.toJSONString()); | 48 | httpUtil.setStringParam(json.toJSONString()); |
| 53 | - Map<String, String> post = httpUtil.post(callBack); | 49 | + Map<String, String> post = httpUtil.post(callBack+"?param="+json.toJSONString()); |
| 54 | return JSONObject.parseObject(post.get("result")); | 50 | return JSONObject.parseObject(post.get("result")); |
| 55 | } | 51 | } |
| 56 | } | 52 | } |