补充 WxCpKfEventMsg 的 rejectSwitch 字段映射 - #4131
binarywang with Copilot wants to merge 2 commits into
Conversation
Co-authored-by: binarywang <1343140+binarywang@users.noreply.github.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
No unresolved review issues remain.
Review effort: Lite
Findings: None
What changed in this PR
Adds the rejectSwitch mapping for WeCom customer-service events and regression coverage for JSON deserialization.
Changes:
- Maps
reject_switchtorejectSwitch. - Adds assertions for the rejection-switch change event.
| File | Description |
|---|---|
weixin-java-cp/src/test/java/me/chanjar/weixin/cp/bean/kf/WxCpKfKnowledgeTest.java |
Adds event parsing regression coverage |
weixin-java-cp/src/main/java/me/chanjar/weixin/cp/bean/kf/msg/WxCpKfEventMsg.java |
Adds the rejectSwitch field mapping |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
🤖 Augment PR Summary总结:此 PR 为企业微信客服事件模型补充 🤖 Was this summary useful? React with 👍 or 👎 |
WxCpKfEventMsg缺少企业微信客服“拒收客户消息变更事件”中的reject_switch字段,导致该事件无法完整反序列化。此 PR 补齐事件模型字段,并增加对应回归用例以覆盖该事件载荷。事件模型补齐
WxCpKfEventMsg中新增rejectSwitch属性@SerializedName("reject_switch")绑定企业微信返回字段回归覆盖
WxCpKfMsgListResp.fromJson(...)增加客服事件 JSON 解析用例reject_customer_msg_switch_change事件场景eventType、servicerUserId和rejectSwitch的解析结果示例
对应事件载荷示例:
{ "msgtype": "event", "event": { "event_type": "reject_customer_msg_switch_change", "servicer_userid": "Zhangsan", "open_kfid": "wkxxx", "external_userid": "wmxxx", "reject_switch": 1 } }