mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-04-05 17:38:05 +08:00
🎨 修复错误引用的代码
This commit is contained in:
parent
185df6e16d
commit
a726e37ba5
@ -5,7 +5,6 @@ import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.chanjar.weixin.common.api.WxErrorExceptionHandler;
|
||||
import me.chanjar.weixin.common.api.WxMessageDuplicateChecker;
|
||||
import me.chanjar.weixin.common.api.WxMessageInMemoryDuplicateChecker;
|
||||
import me.chanjar.weixin.common.api.WxMessageInMemoryDuplicateCheckerSingleton;
|
||||
import me.chanjar.weixin.common.session.InternalSession;
|
||||
import me.chanjar.weixin.common.session.InternalSessionManager;
|
||||
@ -16,10 +15,7 @@ import me.chanjar.weixin.mp.bean.message.WxMpXmlMessage;
|
||||
import me.chanjar.weixin.mp.bean.message.WxMpXmlOutMessage;
|
||||
import me.chanjar.weixin.mp.util.WxMpConfigStorageHolder;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import javax.xml.ws.Holder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@ -106,8 +102,9 @@ public class WxMpMessageRouter {
|
||||
try {
|
||||
if (!this.executorService.awaitTermination(second, TimeUnit.SECONDS)) {
|
||||
this.executorService.shutdownNow();
|
||||
if (!this.executorService.awaitTermination(second, TimeUnit.SECONDS))
|
||||
if (!this.executorService.awaitTermination(second, TimeUnit.SECONDS)) {
|
||||
log.error("线程池未关闭!");
|
||||
}
|
||||
}
|
||||
} catch (InterruptedException ie) {
|
||||
this.executorService.shutdownNow();
|
||||
@ -176,14 +173,16 @@ public class WxMpMessageRouter {
|
||||
/**
|
||||
* 处理不同appid微信消息
|
||||
*/
|
||||
public WxMpXmlOutMessage route(final String appid, final WxMpXmlMessage wxMessage, final Map<String, Object> context) {
|
||||
public WxMpXmlOutMessage route(final String appid, final WxMpXmlMessage wxMessage,
|
||||
final Map<String, Object> context) {
|
||||
return route(wxMessage, context, this.wxMpService.switchoverTo(appid));
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理微信消息.
|
||||
*/
|
||||
public WxMpXmlOutMessage route(final WxMpXmlMessage wxMessage, final Map<String, Object> context, WxMpService wxMpService) {
|
||||
public WxMpXmlOutMessage route(final WxMpXmlMessage wxMessage, final Map<String, Object> context,
|
||||
WxMpService wxMpService) {
|
||||
if (wxMpService == null) {
|
||||
wxMpService = this.wxMpService;
|
||||
}
|
||||
@ -218,7 +217,8 @@ public class WxMpMessageRouter {
|
||||
this.executorService.submit(() -> {
|
||||
//传入父线程的appId
|
||||
this.wxMpService.switchoverTo(appId);
|
||||
rule.service(wxMessage, context, mpService, WxMpMessageRouter.this.sessionManager, WxMpMessageRouter.this.exceptionHandler);
|
||||
rule.service(wxMessage, context, mpService, WxMpMessageRouter.this.sessionManager,
|
||||
WxMpMessageRouter.this.exceptionHandler);
|
||||
})
|
||||
);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user