Skip to content

fix: WxSignQueryResult 缺少 change_type 和 operate_time 字段导致签约回调无法判断类型#3942

Draft
Copilot wants to merge 2 commits intodevelopfrom
copilot/fix-change-type-field-parsing
Draft

fix: WxSignQueryResult 缺少 change_type 和 operate_time 字段导致签约回调无法判断类型#3942
Copilot wants to merge 2 commits intodevelopfrom
copilot/fix-change-type-field-parsing

Conversation

Copy link
Contributor

Copilot AI commented Mar 26, 2026

WxEntrustPapService.parseSignNotifyResult() 返回 WxSignQueryResult,但该类缺少 change_type 字段,导致调用方无法区分签约(ADD)和解约(DELETE)回调。

Changes

  • WxSignQueryResult:新增 changeTypechange_type)和 operateTimeoperate_time)字段,并在 loadXml() 中补充解析逻辑
WxSignQueryResult result = wxEntrustPapService.parseSignNotifyResult(xmlData);

// 现在可以正确获取变更类型
if ("ADD".equals(result.getChangeType())) {
    // 签约回调
} else if ("DELETE".equals(result.getChangeType())) {
    // 解约回调
}

此改动向后兼容,WxSignQueryResult 的查询场景不受影响。

Original prompt

This section details on the original issue you should resolve

<issue_title>委托代扣签约回调 缺少change_type字段解析</issue_title>
<issue_description>

简要描述

委托代扣签约回调 缺少change_type字段解析,无法判断类型

Image

模块版本情况

  <dependency>
        <groupId>com.github.binarywang</groupId>
        <artifactId>weixin-java-pay</artifactId>
        <version>4.8.0</version>
    </dependency>

</issue_description>

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


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Fix missing change_type field parsing in callback fix: WxSignQueryResult 缺少 change_type 和 operate_time 字段导致签约回调无法判断类型 Mar 26, 2026
Copilot AI requested a review from binarywang March 26, 2026 13:30
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.

委托代扣签约回调 缺少change_type字段解析

2 participants