修复:微信委托代扣协议字段名 contract_termination_mode 拼写错误#3813
Merged
binarywang merged 2 commits intodevelopfrom Dec 20, 2025
Merged
Conversation
Co-authored-by: binarywang <1343140+binarywang@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix contract terminated mode field name in WxSignQueryResult
修复:微信委托代扣协议字段名 contract_termination_mode 拼写错误
Dec 19, 2025
There was a problem hiding this comment.
Pull request overview
此 PR 修复了微信委托代扣协议结果类 WxSignQueryResult 中"协议解约方式"字段名的拼写错误,使其与微信官方文档一致。原代码中使用了错误的字段名,导致无法正确解析微信 API 返回的 XML 数据。
主要变更:
- 将 XStream 注解从
contract_terminated_mode更正为contract_termination_mode - 将 XML 解析方法调用从
contract_terminate_mode更正为contract_termination_mode
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/result/WxSignQueryResult.java
Show resolved
Hide resolved
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.
WxSignQueryResult中"协议解约方式"字段名与微信官方文档不一致。文档规定字段名为contract_termination_mode,代码中误写为contract_terminated_mode。修改内容
@XStreamAlias("contract_terminated_mode")→@XStreamAlias("contract_termination_mode")readXmlInteger(d, "contract_terminate_mode")→readXmlInteger(d, "contract_termination_mode")修复前后对比:
参考文档:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.