mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-11-11 19:07:09 +08:00
发送客服消息接口支持以某个客服的名义发送消息
This commit is contained in:
@@ -26,7 +26,18 @@ public class WxMpCustomMessageAPITest {
|
||||
message.setToUser(configStorage.getOpenId());
|
||||
message.setContent("欢迎欢迎,热烈欢迎\n换行测试\n超链接:<a href=\"http://www.baidu.com\">Hello World</a>");
|
||||
|
||||
wxService.customMessageSend(message);
|
||||
this.wxService.customMessageSend(message);
|
||||
}
|
||||
|
||||
public void testSendCustomMessageWithKfAccount() throws WxErrorException {
|
||||
ApiTestModule.WxXmlMpInMemoryConfigStorage configStorage = (ApiTestModule.WxXmlMpInMemoryConfigStorage) wxService.wxMpConfigStorage;
|
||||
WxMpCustomMessage message = new WxMpCustomMessage();
|
||||
message.setMsgType(WxConsts.CUSTOM_MSG_TEXT);
|
||||
message.setToUser(configStorage.getOpenId());
|
||||
message.setKfAccount(configStorage.getKfAccount());
|
||||
message.setContent("欢迎欢迎,热烈欢迎\n换行测试\n超链接:<a href=\"http://www.baidu.com\">Hello World</a>");
|
||||
|
||||
this.wxService.customMessageSend(message);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user