🎨 #3445 【企业微信】第三方应用开发消息处理判断重复的方法进行优化
This commit is contained in:
@@ -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())
|
||||
|
||||
@@ -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()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user