| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…thods Co-authored-by: binarywang <1343140+binarywang@users.noreply.github.com>
已将 PR 描述改为中文。 |
Sorry, something went wrong.
There was a problem hiding this comment.
本 PR 为 WxOpenMessageRouter 添加了小程序服务支持,同时修复了微信支付退款通知中的字段名拼写错误。主要目的是使开发者能够在处理开放平台消息时访问小程序特定的 API 功能。
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| weixin-java-open/src/main/java/me/chanjar/weixin/open/api/impl/WxOpenMessageRouter.java | 新增 routeForMa 方法,通过 context 将 WxOpenMaService 传递给消息处理器,实现小程序消息路由支持 |
| weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/notify/WxPayRefundNotifyResult.java | 修正字段名拼写:refundRecvAccout → refundRecvAccount(保持 XML 别名不变以匹配微信 API) |
| weixin-java-pay/src/test/java/com/github/binarywang/wxpay/bean/notify/WxPayRefundNotifyResultTest.java | 更新测试用例以使用修正后的 getter 方法名 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
问题描述
WxOpenMessageRouter 类原本只支持将消息路由到 WxMpService(公众号),但缺少对 WxOpenMaService(小程序)的支持。这导致开发者在通过路由器处理小程序消息时无法访问小程序特定的功能。
用户原始问题:
解决方案
在 WxOpenMessageRouter 中新增了两个方法,将 WxOpenMaService 注入到消息上下文中:
主要特性:
使用方式
开发者现在可以在处理器中访问 WxOpenMaService:
这使开发者能够通过现有的路由器基础设施处理小程序审核事件、代码提交和其他小程序特定操作。
修复 #3629。
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.