Skip to content

Commit d2eb529

Browse files
committed
issue #99 Wx*MessageRouter.isDuplicateMessage方法逻辑错误
1 parent 57e9bea commit d2eb529

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpMessageRouter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,8 @@ protected boolean isDuplicateMessage(WxCpXmlMessage wxMessage) {
204204
messageId = String.valueOf(wxMessage.getCreateTime())
205205
+ "-" +String.valueOf(wxMessage.getAgentId() == null ? "" : wxMessage.getAgentId())
206206
+ "-" + wxMessage.getFromUserName()
207-
+ "-" + String.valueOf(wxMessage.getEventKey() == null ? "" : wxMessage.getEventKey());
207+
+ "-" + String.valueOf(wxMessage.getEventKey() == null ? "" : wxMessage.getEventKey())
208+
+ "-" + String.valueOf(wxMessage.getEvent() == null ? "" : wxMessage.getEvent())
208209
;
209210
} else {
210211
messageId = String.valueOf(wxMessage.getMsgId());

weixin-java-mp/src/main/java/me/chanjar/weixin/mp/api/WxMpMessageRouter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,8 @@ protected boolean isDuplicateMessage(WxMpXmlMessage wxMessage) {
203203
if (wxMessage.getMsgId() == null) {
204204
messageId = String.valueOf(wxMessage.getCreateTime())
205205
+ "-" + wxMessage.getFromUserName()
206-
+ "-" + String.valueOf(wxMessage.getEventKey() == null ? "" : wxMessage.getEventKey());
206+
+ "-" + String.valueOf(wxMessage.getEventKey() == null ? "" : wxMessage.getEventKey())
207+
+ "-" + String.valueOf(wxMessage.getEvent() == null ? "" : wxMessage.getEvent())
207208
;
208209
} else {
209210
messageId = String.valueOf(wxMessage.getMsgId());

0 commit comments

Comments
 (0)