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 | 6 | import org.springframework.beans.factory.annotation.Value; |
| 7 | 7 | import org.springframework.stereotype.Component; |
| 8 | 8 | |
| 9 | -import java.util.HashMap; | |
| 10 | 9 | import java.util.Map; |
| 11 | 10 | |
| 12 | 11 | /** |
| ... | ... | @@ -33,16 +32,13 @@ public class AuditPass { |
| 33 | 32 | */ |
| 34 | 33 | public JSONObject auditPass(String video_id,int state,String attr_tags,String msg,String callBack){ |
| 35 | 34 | logger.info("点播回调:video_id:{},state:{},attr_tags:{},msg:{}",video_id,state,attr_tags,msg); |
| 36 | - Map<String, String> paramsMap = new HashMap<>(); | |
| 37 | 35 | JSONObject params = new JSONObject(); |
| 38 | 36 | params.put("video_id",video_id); |
| 39 | 37 | params.put("state",state+""); |
| 40 | 38 | params.put("attr_tags",attr_tags); |
| 41 | 39 | params.put("msg",msg); |
| 42 | - paramsMap.put("params",params.toJSONString()); | |
| 43 | 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 | 42 | Map<String, String> post = httpUtil.post(URL); |
| 47 | 43 | return JSONObject.parseObject(post.get("result")); |
| 48 | 44 | } |
| ... | ... | @@ -50,7 +46,7 @@ public class AuditPass { |
| 50 | 46 | public JSONObject commentPass(JSONObject json,String callBack){ |
| 51 | 47 | HttpUtil httpUtil = HttpUtil.init(); |
| 52 | 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 | 50 | return JSONObject.parseObject(post.get("result")); |
| 55 | 51 | } |
| 56 | 52 | } | ... | ... |