This commit is contained in:
jinyu
2016-12-23 17:20:29 +08:00
parent 9d21efe31f
commit 2adaf6d569
3 changed files with 7 additions and 9 deletions
@@ -1558,7 +1558,7 @@ public class WeixinProxy {
* 发送模板消息
*
* @param tplMessage
* 模板消息主体
* 模板消息主体
* @return 发送的消息ID
* @throws WeixinException
* @see <a href=
@@ -1570,7 +1570,7 @@ public class WeixinProxy {
* @see com.foxinmy.weixin4j.mp.message.TemplateMessage
* @seee com.foxinmy.weixin4j.msg.event.TemplatesendjobfinishMessage
* @see com.foxinmy.weixin4j.mp.api.TmplApi
*/
*/
public String sendTmplMessage(TemplateMessage tplMessage)
throws WeixinException {
return tmplApi.sendTmplMessage(tplMessage);
@@ -147,7 +147,7 @@ public class TmplApi extends MpApi {
*
* @param tplMessage
* 消息对象
* @return 发送结果
* @return 发送的消息ID
* @throws WeixinException
* @see <a
* href="https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1433751277&token=&lang=zh_CN">模板消息</a>
@@ -157,7 +157,7 @@ public class TmplApi extends MpApi {
* @see com.foxinmy.weixin4j.mp.message.TemplateMessage
* @see com.foxinmy.weixin4j.msg.event.TemplatesendjobfinishMessage
*/
public ApiResult sendTmplMessage(TemplateMessage tplMessage)
public String sendTmplMessage(TemplateMessage tplMessage)
throws WeixinException {
Token token = tokenManager.getCache();
String template_send_uri = getRequestUri("template_send_uri");
@@ -174,6 +174,6 @@ public class TmplApi extends MpApi {
}
}));
return response.getAsResult();
return response.getAsJson().getString("msgid");
}
}