feat(miniapp): 添加虚拟支付退款推送(xpay_refund_notify)事件字段#3896
Merged
binarywang merged 3 commits intodevelopfrom Mar 3, 2026
Merged
Conversation
Co-authored-by: binarywang <1343140+binarywang@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add refund notification fields to WxMaMessage
feat(miniapp): 添加虚拟支付退款推送(xpay_refund_notify)事件字段
Mar 3, 2026
There was a problem hiding this comment.
Pull request overview
本次 PR 为小程序消息模型补齐“虚拟支付退款推送事件(xpay_refund_notify)”的字段解析能力,使 SDK 使用方可以直接通过 WxMaMessage 读取退款回调的关键数据。
Changes:
- 在
WxMaMessage中新增xpay_refund_notify事件的退款单号、订单号、金额、结果、时间戳、重试次数及拼团信息等字段 - 新增
WxMaXPayTeamInfoPOJO,用于承载拼团信息(TeamInfo) - 在
WxMaConstants.XPayNotifyEvent中新增REFUND = "xpay_refund_notify"常量
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/constant/WxMaConstants.java | 增加 xpay_refund_notify 事件常量,便于路由/判断事件类型 |
| weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/bean/xpay/WxMaXPayTeamInfo.java | 新增拼团信息数据结构,供回调消息字段复用 |
| weixin-java-miniapp/src/main/java/cn/binarywang/wx/miniapp/bean/WxMaMessage.java | 增加退款推送事件字段定义与(JSON/XML)映射注解 |
Comment on lines
+317
to
+321
| // xpay_refund_notify 退款推送字段 | ||
|
|
||
| /** | ||
| * 微信退款单号. | ||
| * xpay_refund_notify |
There was a problem hiding this comment.
新增 xpay_refund_notify 字段后,建议在现有 WxMaMessageTest 中补充对应的 fromXml/fromJson 解析用例(含 TeamInfo 嵌套对象),以确保字段名大小写、类型(Integer/Long)及反序列化行为在后续重构时不会回归。当前 PR 仅新增字段定义,缺少针对该事件的覆盖。
Owner
|
@copilot apply changes based on the comments in this thread |
Co-authored-by: binarywang <1343140+binarywang@users.noreply.github.com>
Contributor
Author
已在
|
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.
WxMaMessage缺少微信虚拟支付退款推送事件(xpay_refund_notify)的字段支持,导致开发者无法直接解析退款回调消息。Changes
WxMaMessage— 新增xpay_refund_notify推送事件全部字段:wxRefundIdmchRefundIdwxOrderIdmchOrderIdrefundFeeretCoderetMsgrefundStartTimestamprefundSuccTimestampwxpayRefundTransactionIdretryTimesteamInfoWxMaXPayTeamInfo(新增)— 拼团信息 POJO,复用于xpay_goods_deliver_notify和xpay_refund_notify两个推送事件,字段:activityId、teamId、teamType、teamActionWxMaConstants.XPayNotifyEvent— 新增常量REFUND = "xpay_refund_notify"WxMaMessageTest— 新增testXPayRefundNotifyFromXml和testXPayRefundNotifyFromJson两个测试用例,覆盖所有退款字段及TeamInfo嵌套对象的反序列化正确性参考文档:虚拟支付退款推送
Original prompt
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.