Merged
Conversation
Co-authored-by: binarywang <1343140+binarywang@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix empty MemChangeList string in group chat updates
修复企业微信群聊变更事件MemChangeList字段命名规范问题
Jan 3, 2026
There was a problem hiding this comment.
Pull request overview
本PR修复了企业微信群聊变更事件中MemChangeList字段因命名不规范导致的解析异常问题。在4.7.9.B版本中,该字段显示为空字符串,原因是字段名首字母大写违反了Java命名规范。
关键修改:
- 将
WxCpXmlMessage类中的字段名从MemChangeList改为memChangeList,符合Java驼峰命名规范 - 保持
@XStreamAlias("MemChangeList")注解不变,确保XML解析正确 - 新增完整的测试用例,覆盖成员加入、退出及无成员变更三种场景
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/message/WxCpXmlMessage.java | 修复字段命名:将MemChangeList改为memChangeList,符合Java命名规范,同时保持XML别名注解不变 |
| weixin-java-cp/src/test/java/me/chanjar/weixin/cp/bean/message/WxCpXmlMessageTest.java | 新增testExternalChatChangeEvent测试方法,全面测试群聊成员变更事件的三种场景(加入、退出、无变更) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

问题
4.7.9.B版本中企业微信群聊变更事件的
MemChangeList字段解析异常,显示为空字符串。根因是WxCpXmlMessage类中字段名MemChangeList首字母大写,违反Java命名规范。修改内容
核心修复
MemChangeList改为memChangeList(保持@XStreamAlias("MemChangeList")不变)测试覆盖
testExternalChatChangeEvent测试方法示例
相关文档: 企业微信客户群变更回调
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.