jekins 推送测试
This commit is contained in:
@@ -112,7 +112,7 @@ public class WxSendUtil {
|
|||||||
HashMap<Object, Object> mpnews = new HashMap<>();
|
HashMap<Object, Object> mpnews = new HashMap<>();
|
||||||
mpnews.put("articles", articlesList);
|
mpnews.put("articles", articlesList);
|
||||||
jsonMap.put("mpnews", mpnews);
|
jsonMap.put("mpnews", mpnews);
|
||||||
logger.info("发送的消息内容:" + JSON.toJSONString(jsonMap));
|
logger.info("发送的消息内容: \n" + JSON.toJSONString(jsonMap));
|
||||||
|
|
||||||
String token = getToken(wxMessageType.getCorpid(), wxMessageType.getCorpsecret());
|
String token = getToken(wxMessageType.getCorpid(), wxMessageType.getCorpsecret());
|
||||||
//logger.info("获取的token"+token);
|
//logger.info("获取的token"+token);
|
||||||
@@ -122,7 +122,7 @@ public class WxSendUtil {
|
|||||||
String responseStr = HttpRequest.post(SEND + getToken(wxMessageType.getCorpid(), wxMessageType.getCorpsecret()))
|
String responseStr = HttpRequest.post(SEND + getToken(wxMessageType.getCorpid(), wxMessageType.getCorpsecret()))
|
||||||
.body(JSON.toJSONString(jsonMap))//头信息,多个头信息多次调用此方法即可
|
.body(JSON.toJSONString(jsonMap))//头信息,多个头信息多次调用此方法即可
|
||||||
.execute().body();
|
.execute().body();
|
||||||
logger.info("发送消息的响应:" + responseStr);
|
logger.info("发送消息的响应: \n" + responseStr);
|
||||||
|
|
||||||
SendRespones sendRespones = JSON.parseObject(responseStr, SendRespones.class);
|
SendRespones sendRespones = JSON.parseObject(responseStr, SendRespones.class);
|
||||||
if (sendRespones.getErrcode().equals(0)) {
|
if (sendRespones.getErrcode().equals(0)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user