Browse Source

微信推送问题

koul 6 years ago
parent
commit
4cc3c3c13a

+ 2 - 3
applications/wechat/wechat-server/src/main/java/com/usoftchina/smartschool/wechat/service/impl/WxPushServiceImpl.java

@@ -36,14 +36,13 @@ public class WxPushServiceImpl implements WxPushService{
                 params.put("grant_type", "client_credential");
                 HttpRequest httpRequest= HttpRequest.get("https://api.weixin.qq.com/cgi-bin/token",params,false);
                 String content=httpRequest.body();
-                //System.err.println("getWxAccessTokenContent======"+content);
+                System.err.println("getWxAccessTokenContent======"+content);
                 String token= JSON.parseObject(content).getString("access_token");
-                //System.err.println("getWxAccessTokenToken====="+ token);
                 HttpRequest hRequest=  HttpRequest.post("https://api.weixin.qq.com/cgi-bin/message/template/send?access_token="+token)
                         .header("Content-Type", "application/json")
                         .send(json.getBytes());
                 String result= hRequest.body();
-                //System.err.println("WxPushResult======="+result);
+                System.err.println("WxPushResult======="+result);
 
 			/*if(JSON.parseObject(result).getInteger("errcode")==0&&JSON.parseObject(result).getString("errmsg").equals("ok")){
 				return "推送成功!";