修复退款请求 funds_account 重复映射冲突,确保 V3 退款参数可正确序列化#4025
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 35765158db
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| */ | ||
| @SerializedName(value = "funds_account") | ||
| private String fundsAccount; | ||
| } |
There was a problem hiding this comment.
Keep the partner fundsAccount setter ABI
Removing this field also removes Lombok's generated WxPayPartnerRefundV3Request setFundsAccount(String) method. Existing applications compiled against the previous artifact will still invoke that exact descriptor and can hit NoSuchMethodError after upgrading, because the inherited setter returns WxPayRefundV3Request instead; recompilation also breaks chains where a partner-specific setter follows setFundsAccount. Please add an explicit forwarding setter on the partner request that writes the inherited property and returns WxPayPartnerRefundV3Request, without reintroducing the duplicate serialized field.
Useful? React with 👍 / 👎.
问题聚焦在 V3 退款参数
funds_account的可用性:普通商户退款请求需要支持该字段及amount.from资金出资明细。当前代码中普通商户模型已具备这两个参数,但服务商退款子类对funds_account的重复声明会导致 Gson 序列化冲突。变更摘要
WxPayPartnerRefundV3Request中移除重复的fundsAccount字段定义(保留父类WxPayRefundV3Request的统一定义)。WxPayRefundV3Request中funds_account与Amount.from的现有结构不变,避免接口参数语义漂移。funds_account,不再触发重复 JSON 字段异常。影响范围
weixin-java-pay模块退款请求模型(V3)。