Browse Source

测试推送问题

koul 7 years ago
parent
commit
573d056fbb

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

@@ -4,12 +4,16 @@ import com.alibaba.fastjson.JSON;
 import com.github.kevinsawicki.http.HttpRequest;
 import com.usoftchina.smartschool.wechat.service.WxPushService;
 import com.usoftchina.smartschool.wechat.wxUtils.ObjectUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Service;
 
 import java.util.HashMap;
 
 @Service
 public class WxPushServiceImpl implements WxPushService{
+
+    private static final Logger log = LoggerFactory.getLogger(WxPushServiceImpl.class);
     /**
      * 推送消息
      * @param
@@ -35,7 +39,7 @@ public class WxPushServiceImpl implements WxPushService{
                         .header("Content-Type", "application/json")
                         .send(json.getBytes());
                 String result= hRequest.body();
-                System.err.println(result);
+                log.info("WxPushResult======="+result);
 
 			/*if(JSON.parseObject(result).getInteger("errcode")==0&&JSON.parseObject(result).getString("errmsg").equals("ok")){
 				return "推送成功!";