We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
当审批人批量审批时,同一个提交人提交了两个审批,由于时间也一致,导致其中一条消息被排重了。
WxCpMessageRouter
isMsgDuplicated
private boolean isMsgDuplicated(WxCpXmlMessage wxMessage) { StringBuilder messageId = new StringBuilder(); if (wxMessage.getMsgId() == null) { messageId.append(wxMessage.getCreateTime()) .append("-").append(StringUtils.trimToEmpty(String.valueOf(wxMessage.getAgentId()))) .append("-").append(wxMessage.getFromUserName()) .append("-").append(StringUtils.trimToEmpty(wxMessage.getEventKey())) .append("-").append(StringUtils.trimToEmpty(wxMessage.getEvent())); } else { messageId.append(wxMessage.getMsgId()) .append("-").append(wxMessage.getCreateTime()) .append("-").append(wxMessage.getFromUserName()); } append(messageId, wxMessage.getUserId()); append(messageId, wxMessage.getChangeType()); append(messageId, wxMessage.getTagId()); append(messageId, wxMessage.getId()); append(messageId, wxMessage.getChatId()); append(messageId, wxMessage.getExternalUserId()); //这里,增加审批编号 if(StringUtils.isNotBlank(wxMessage.getApprovalInfo().getSpNo())){ append(messageId, wxMessage.getApprovalInfo().getSpNo()); } return this.messageDuplicateChecker.isDuplicate(messageId.toString()); }
setMessageId
messageId
The text was updated successfully, but these errors were encountered:
你可以直接提交PR,把两种方法都加入
Sorry, something went wrong.
最新版本4.5.0已经修复了,我看漏了以为没有修复:【企业微信】修复不同的消息推送会判断为重复的问题,第二种方法就先不处理了,再遇到其它的再说吧。
No branches or pull requests
简要描述
当审批人批量审批时,同一个提交人提交了两个审批,由于时间也一致,导致其中一条消息被排重了。
模块版本情况
可能的解决方法
WxCpMessageRouter
类中的isMsgDuplicated
方法,增加审批编号的判定:setMessageId
的相关方法,方便后续开发者自己来定义自己的规则来生成messageId
The text was updated successfully, but these errors were encountered: