USVT-136 因为当前的微信公众号不支持异步消息策略,因此暂时不使用异步消息方法

This commit is contained in:
YuCheng Hu 2023-02-13 00:39:35 -05:00
parent b5595353ed
commit 96e5f0ff56
1 changed files with 10 additions and 10 deletions

View File

@ -178,18 +178,18 @@ public class WeChatService {
future.cancel(true); // may or may not desire this
}
try {
sendMessage(toUserName);
} catch (WxErrorException e) {
throw new RuntimeException(e);
}
// try {
// sendMessage(toUserName);
// } catch (WxErrorException e) {
// throw new RuntimeException(e);
// }
// weChatMessage.setToUserName(toUserName);
// weChatMessage.setFromUserName(fromUserName);
// weChatMessage.setContent(contentGPT);
// weChatMessage.setCreateTime(Instant.now().toEpochMilli());
weChatMessage.setToUserName(toUserName);
weChatMessage.setFromUserName(fromUserName);
weChatMessage.setContent(contentGPT);
weChatMessage.setCreateTime(Instant.now().toEpochMilli());
return "success";// WeChatUtils.covertToWeChatMessageXmlStr(weChatMessage);
return WeChatUtils.covertToWeChatMessageXmlStr(weChatMessage);
}
public String sendMessage(String toUserName) throws WxErrorException {