File tree Expand file tree Collapse file tree 1 file changed +11
-7
lines changed
weixin-java-cp/src/main/java/me/chanjar/weixin/cp/message Expand file tree Collapse file tree 1 file changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -209,16 +209,20 @@ private boolean isMsgDuplicated(WxCpXmlMessage wxMessage) {
209
209
.append ("-" ).append (wxMessage .getCreateTime ())
210
210
.append ("-" ).append (wxMessage .getFromUserName ());
211
211
}
212
+ append (messageId , wxMessage .getUserId ());
213
+ append (messageId , wxMessage .getChangeType ());
214
+ append (messageId , wxMessage .getTagId ());
215
+ append (messageId , wxMessage .getId ());
216
+ append (messageId , wxMessage .getChatId ());
217
+ append (messageId , wxMessage .getExternalUserId ());
212
218
213
- if (StringUtils .isNotEmpty (wxMessage .getUserId ())) {
214
- messageId .append ("-" ).append (wxMessage .getUserId ());
215
- }
219
+ return this .messageDuplicateChecker .isDuplicate (messageId .toString ());
220
+ }
216
221
217
- if (StringUtils .isNotEmpty (wxMessage .getChangeType ())) {
218
- messageId .append ("-" ).append (wxMessage .getChangeType ());
222
+ private void append (StringBuilder sb , String value ){
223
+ if (StringUtils .isNotEmpty (value )){
224
+ sb .append ("-" ).append (value );
219
225
}
220
-
221
- return this .messageDuplicateChecker .isDuplicate (messageId .toString ());
222
226
}
223
227
224
228
/**
You can’t perform that action at this time.
0 commit comments