| | |
| | | String url = interfaceUrl[0].replace("${accesstoken}",token); |
| | | QywxSendMsgResponse response = sendHttpRequestSingle(url,interfaceUrl[1],JSONObject.toJSONString(param) |
| | | ,new TypeReference<QywxSendMsgResponse>(){}); |
| | | log.error("推送消息结果{}",JSONObject.toJSONString(response)); |
| | | if(response.getErrcode()!=null && response.getErrcode() ==0){ |
| | | return response; |
| | | } |
| | |
| | | * @param <T> |
| | | */ |
| | | public static <T> QywxBaseResponse<T> sendHttpRequest(String url, String name, String param, TypeReference<QywxBaseResponse<T>> typeReference){ |
| | | log.info("【"+name+"】================开始===="+ JSONObject.toJSONString(param)); |
| | | log.info("【"+name+"】================开始===="+url+"\nparam==========================:"+ JSONObject.toJSONString(param)); |
| | | if ( StringUtils.isNotBlank(url)) { |
| | | String res = null; |
| | | try { |