1
0
mirror of synced 2025-12-13 18:34:29 +08:00

🎨 #3445 【企业微信】第三方应用开发消息处理判断重复的方法进行优化

This commit is contained in:
Zeyes Lee
2024-12-18 21:50:53 +08:00
committed by Binary Wang
parent 24f03e9573
commit 75aa3fce9a
5 changed files with 8 additions and 7 deletions

View File

@@ -258,7 +258,7 @@ public class WxCpMessageRouter {
return this.route(wxMessage, new HashMap<>(2));
}
private boolean isMsgDuplicated(WxCpXmlMessage wxMessage) {
protected boolean isMsgDuplicated(WxCpXmlMessage wxMessage) {
StringBuilder messageId = new StringBuilder();
if (wxMessage.getMsgId() == null) {
messageId.append(wxMessage.getCreateTime())

View File

@@ -278,7 +278,7 @@ public class WxCpTpMessageRouter {
return this.route(wxMessage, new HashMap<>(2));
}
private boolean isMsgDuplicated(final String suiteId, WxCpTpXmlMessage wxMessage) {
protected boolean isMsgDuplicated(final String suiteId, WxCpTpXmlMessage wxMessage) {
StringBuilder messageId = new StringBuilder();
messageId.append(wxMessage.getToUserName());
if (wxMessage.getInfoType() != null) {
@@ -306,7 +306,8 @@ public class WxCpTpMessageRouter {
.append("-").append(wxMessage.getCreateTime())
.append("-").append(wxMessage.getFromUserName())
.append("-").append(StringUtils.trimToEmpty(wxMessage.getEvent()))
.append("-").append(StringUtils.trimToEmpty(wxMessage.getEventKey()));
.append("-").append(StringUtils.trimToEmpty(wxMessage.getEventKey()))
.append("-").append(StringUtils.trimToEmpty(wxMessage.getExternalUserID()));
}
}