🐛 #1937 【公众号】修复动态添加公众号配置的问题

This commit is contained in:
Binary Wang 2020-12-27 20:07:49 +08:00
parent 2e18fec385
commit 58e9411b45
2 changed files with 4 additions and 2 deletions

View File

@ -328,12 +328,13 @@ public abstract class BaseWxMaServiceImpl<H, P> implements WxMaService, RequestH
} }
@Override @Override
public void addConfig(String mpId, WxMaConfig configStorages) { public void addConfig(String miniappId, WxMaConfig configStorages) {
synchronized (this) { synchronized (this) {
if (this.configMap == null) { if (this.configMap == null) {
this.setWxMaConfig(configStorages); this.setWxMaConfig(configStorages);
} else { } else {
this.configMap.put(mpId, configStorages); WxMaConfigHolder.set(miniappId);
this.configMap.put(miniappId, configStorages);
} }
} }
} }

View File

@ -439,6 +439,7 @@ public abstract class BaseWxMpServiceImpl<H, P> implements WxMpService, RequestH
if (this.configStorageMap == null) { if (this.configStorageMap == null) {
this.setWxMpConfigStorage(configStorages); this.setWxMpConfigStorage(configStorages);
} else { } else {
WxMpConfigStorageHolder.set(mpId);
this.configStorageMap.put(mpId, configStorages); this.configStorageMap.put(mpId, configStorages);
} }
} }