Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 19, 2025

WxSignQueryResult 中"协议解约方式"字段名与微信官方文档不一致。文档规定字段名为 contract_termination_mode,代码中误写为 contract_terminated_mode

修改内容

  • XStream 注解@XStreamAlias("contract_terminated_mode")@XStreamAlias("contract_termination_mode")
  • XML 解析readXmlInteger(d, "contract_terminate_mode")readXmlInteger(d, "contract_termination_mode")

修复前后对比:

// 修复前
@XStreamAlias("contract_terminated_mode")
private Integer contractTerminatedMode;

protected void loadXml(Document d) {
  contractTerminatedMode = readXmlInteger(d, "contract_terminate_mode");
}

// 修复后
@XStreamAlias("contract_termination_mode")
private Integer contractTerminatedMode;

protected void loadXml(Document d) {
  contractTerminatedMode = readXmlInteger(d, "contract_termination_mode");
}

参考文档:

Original prompt

This section details on the original issue you should resolve

<issue_title>微信委托代扣协议结果 contract_terminated_mode 字段名错误</issue_title>
<issue_description>### 简要描述
com.github.binarywang.wxpay.bean.result.WxSignQueryResult 中 "协议解约方式" 字段的字段名, 并非 contract_terminated_mode , 而是 contract_termination_mode .

代码参见:

/**
* 协议解约方式
* 非必传
*/
@XStreamAlias("contract_terminated_mode")
private Integer contractTerminatedMode;

微信支付文档参见:
签约、解约结果通知查询签约关系

Image

模块版本情况

  • WxJava 模块名: weixin-java-pay
  • WxJava 版本号: 4.7.9.B

</issue_description>

Comments on the Issue (you are @copilot in this section)

Custom agent used: 全部用中文
需要用中文,包括PR标题和分析总结过程


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Fix contract terminated mode field name in WxSignQueryResult 修复:微信委托代扣协议字段名 contract_termination_mode 拼写错误 Dec 19, 2025
Copilot AI requested a review from binarywang December 19, 2025 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

微信委托代扣协议结果 contract_terminated_mode 字段名错误

2 participants