diff --git a/weixin-java-mp/src/main/java/me/chanjar/weixin/mp/api/WxMpMessageRouter.java b/weixin-java-mp/src/main/java/me/chanjar/weixin/mp/api/WxMpMessageRouter.java index 067226cc8..070e952c0 100644 --- a/weixin-java-mp/src/main/java/me/chanjar/weixin/mp/api/WxMpMessageRouter.java +++ b/weixin-java-mp/src/main/java/me/chanjar/weixin/mp/api/WxMpMessageRouter.java @@ -225,6 +225,7 @@ public class WxMpMessageRouter { if (wxMpService == null) { wxMpService = this.wxMpService; } + final WxMpService mpService = wxMpService; if (isMsgDuplicated(wxMessage)) { // 如果是重复消息,那么就不做处理 @@ -253,11 +254,11 @@ public class WxMpMessageRouter { // 返回最后一个非异步的rule的执行结果 if (rule.isAsync()) { //获取当前线程使用的实际appId。兼容只有一个appId,且未显式设置当前使用的appId的情况 - String appId = this.wxMpService.getWxMpConfigStorage().getAppId(); + String appId = mpService.getWxMpConfigStorage().getAppId(); futures.add( this.executorService.submit(() -> { //传入父线程的appId - this.wxMpService.switchoverTo(appId); + mpService.switchoverTo(appId); rule.service(wxMessage, context, mpService, WxMpMessageRouter.this.sessionManager, WxMpMessageRouter.this.exceptionHandler); WxMpConfigStorageHolder.remove(); diff --git a/weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/tcb/ShareCloudBaseEnvRequest.java b/weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/tcb/ShareCloudBaseEnvRequest.java index 97e3cd7c9..6dc74dbad 100644 --- a/weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/tcb/ShareCloudBaseEnvRequest.java +++ b/weixin-java-open/src/main/java/me/chanjar/weixin/open/bean/tcb/ShareCloudBaseEnvRequest.java @@ -37,4 +37,5 @@ public class ShareCloudBaseEnvRequest implements Serializable { @SerializedName("appids") private List appids; } + }