1
0
mirror of synced 2025-12-14 10:58:07 +08:00

Compare commits

...

4 Commits

Author SHA1 Message Date
Copilot
f534b26daf Merge 66dcf55552 into db85c0ab8a 2025-10-06 18:02:24 +00:00
copilot-swe-agent[bot]
66dcf55552 Add WxOpenMaService support to WxOpenMessageRouter with routeForMa methods
Co-authored-by: binarywang <1343140+binarywang@users.noreply.github.com>
2025-07-24 07:59:15 +00:00
copilot-swe-agent[bot]
ec5c1716a3 Initial plan 2025-07-24 07:43:28 +00:00
Binary Wang
eb987323e1 🎨 修复错误的变量命名 2025-07-24 15:35:44 +08:00

View File

@@ -23,4 +23,29 @@ public class WxOpenMessageRouter extends WxMpMessageRouter {
public WxMpXmlOutMessage route(final WxMpXmlMessage wxMessage, final Map<String, Object> context, String appId) {
return route(wxMessage, context, wxOpenService.getWxOpenComponentService().getWxMpServiceByAppid(appId));
}
/**
* 路由微信消息到小程序服务 (Route WeChat message to Mini App service)
*
* @param wxMessage the wx message
* @param appId the app id
* @return the wx mp xml out message
*/
public WxMpXmlOutMessage routeForMa(final WxMpXmlMessage wxMessage, String appId) {
return routeForMa(wxMessage, new HashMap<>(), appId);
}
/**
* 路由微信消息到小程序服务 (Route WeChat message to Mini App service)
*
* @param wxMessage the wx message
* @param context the context
* @param appId the app id
* @return the wx mp xml out message
*/
public WxMpXmlOutMessage routeForMa(final WxMpXmlMessage wxMessage, final Map<String, Object> context, String appId) {
// 将小程序服务放入上下文中,以便处理器可以访问 (Put Mini App service in context so handlers can access it)
context.put("wxOpenMaService", wxOpenService.getWxOpenComponentService().getWxMaServiceByAppid(appId));
return route(wxMessage, context, wxOpenService.getWxOpenComponentService().getWxMpServiceByAppid(appId));
}
}