|
|
|
@@ -53,14 +53,17 @@ public class WxMpManager { |
|
|
|
return openService.getWxOpenComponentService().getWxMpServiceByAppid(appId); |
|
|
|
} |
|
|
|
|
|
|
|
public WxMpMessageRouter getRouter(WxMpService mpService) { |
|
|
|
String appId = mpService.getWxMpConfigStorage().getAppId(); |
|
|
|
public WxMpMessageRouter getRouter(String appId) { |
|
|
|
|
|
|
|
if (myRouterMap.containsKey(appId)) { |
|
|
|
logger.info("found appId : ", appId); |
|
|
|
return myRouterMap.get(appId); |
|
|
|
} else { |
|
|
|
WxMpService wxMpService = openService.getWxOpenComponentService().getWxMpServiceByAppid(appId); |
|
|
|
WxMpMessageRouter newRouter = newRouter(wxMpService); |
|
|
|
myRouterMap.put(appId, newRouter); |
|
|
|
logger.info("found new appId : ", appId); |
|
|
|
return newRouter(mpService); |
|
|
|
return newRouter; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@@ -134,8 +137,6 @@ public class WxMpManager { |
|
|
|
// 默认 |
|
|
|
newRouter.rule().async(false).handler(this.msgHandler).end(); |
|
|
|
|
|
|
|
myRouterMap.put(wxMpService.getWxMpConfigStorage().getAppId(), newRouter); |
|
|
|
|
|
|
|
return newRouter; |
|
|
|
} |
|
|
|
|
|
|
|
|