GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — 修复:微信委托代扣协议字段名 contract_termination_mode 拼写错误 by Copilot · Pull Request #3813 · binarywang/WxJava

Conversation

Copilot AI commented Dec 19, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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 .

代码参见:

WxJava/weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/result/WxSignQueryResult.java

Lines 85 to 90 in b56eddd

/**
* 协议解约方式
* 非必传
*/
@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标题和分析总结过程

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

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Initial plan
cc6b36b
Copilot AI assigned Copilot and binarywang Dec 19, 2025
Copilot started work on behalf of binarywang December 19, 2025 17:18
View session
@binarywang
修复:将 contract_terminated_mode 字段名改为正确的 contract_termination_mode
37a3b5b
Co-authored-by: binarywang <[email protected]>
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
Copilot finished work on behalf of binarywang December 19, 2025 17:24
@binarywang
binarywang marked this pull request as ready for review December 20, 2025 12:05
Copilot AI review requested due to automatic review settings December 20, 2025 12:05
Copilot started reviewing on behalf of binarywang December 20, 2025 12:06
View session
@binarywang
binarywang merged commit 1453747 into develop Dec 20, 2025
5 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@binarywang
binarywang deleted the copilot/fix-contract-terminated-mode branch December 20, 2025 12:07
Copilot AI reviewed Dec 20, 2025
View reviewed changes

Copilot AI left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

此 PR 修复了微信委托代扣协议结果类 WxSignQueryResult 中"协议解约方式"字段名的拼写错误,使其与微信官方文档一致。原代码中使用了错误的字段名,导致无法正确解析微信 API 返回的 XML 数据。

主要变更:

  • 将 XStream 注解从 contract_terminated_mode 更正为 contract_termination_mode
  • 将 XML 解析方法调用从 contract_terminate_mode 更正为 contract_termination_mode

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/result/WxSignQueryResult.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Copilot AI added a commit that referenced this pull request Dec 21, 2025
🎨 #3813 【微信支付】修复委托代扣协议字段名拼写错误
d05d4ba
@binarywang binarywang added this to the 4.8.0 milestone Dec 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

Copilot code review Copilot
Copilot review effort
Applies to this pull request for everyone.Learn more about Copilot code review.
Copilot left review comments
@binarywang binarywang Awaiting requested review from binarywang

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@binarywang binarywang

Copilot code review Copilot

Labels

None yet

Projects

None yet

Milestone

4.8.0

Development

Successfully merging this pull request may close these issues.

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

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@binarywang
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.