|
|
|
@@ -31,22 +31,30 @@ public class WxMpManager { |
|
|
|
@Autowired |
|
|
|
protected FmOpenService openService; |
|
|
|
|
|
|
|
private LogHandler logHandler = new LogHandler(); |
|
|
|
private NullHandler nullHandler = new NullHandler(); |
|
|
|
private KfSessionHandler kfSessionHandler = new KfSessionHandler(); |
|
|
|
private StoreCheckNotifyHandler storeCheckNotifyHandler = new StoreCheckNotifyHandler(); |
|
|
|
private LocationHandler locationHandler = new LocationHandler(); |
|
|
|
private MenuHandler menuHandler = new MenuHandler(); |
|
|
|
private MsgHandler msgHandler = new MsgHandler(); |
|
|
|
private UnsubscribeHandler unsubscribeHandler = new UnsubscribeHandler(); |
|
|
|
private SubscribeHandler subscribeHandler = new SubscribeHandler(); |
|
|
|
@Autowired |
|
|
|
protected LogHandler logHandler; |
|
|
|
@Autowired |
|
|
|
protected NullHandler nullHandler; |
|
|
|
@Autowired |
|
|
|
protected KfSessionHandler kfSessionHandler; |
|
|
|
@Autowired |
|
|
|
protected StoreCheckNotifyHandler storeCheckNotifyHandler; |
|
|
|
@Autowired |
|
|
|
protected LocationHandler locationHandler; |
|
|
|
@Autowired |
|
|
|
protected MenuHandler menuHandler; |
|
|
|
@Autowired |
|
|
|
protected MsgHandler msgHandler; |
|
|
|
@Autowired |
|
|
|
protected UnsubscribeHandler unsubscribeHandler; |
|
|
|
@Autowired |
|
|
|
protected SubscribeHandler subscribeHandler; |
|
|
|
|
|
|
|
public WxMpService getMpService(String appId) { |
|
|
|
return openService.getWxOpenComponentService().getWxMpServiceByAppid(appId); |
|
|
|
} |
|
|
|
|
|
|
|
public WxMpMessageRouter getRouter(String appId) { |
|
|
|
|
|
|
|
if (myRouterMap.containsKey(appId)) { |
|
|
|
logger.info("found appId : " + appId); |
|
|
|
return myRouterMap.get(appId); |
|
|
|
@@ -64,6 +72,7 @@ public class WxMpManager { |
|
|
|
|
|
|
|
// 记录所有事件的日志 (异步执行) |
|
|
|
newRouter.rule().handler(this.logHandler).next(); |
|
|
|
/* |
|
|
|
|
|
|
|
// 接收客服会话管理事件 |
|
|
|
newRouter.rule().async(false) |
|
|
|
@@ -128,7 +137,7 @@ public class WxMpManager { |
|
|
|
|
|
|
|
// 默认 |
|
|
|
newRouter.rule().async(false).handler(this.msgHandler).end(); |
|
|
|
|
|
|
|
*/ |
|
|
|
return newRouter; |
|
|
|
} |
|
|
|
|
|
|
|
|