Skip to content

Commit 9fd7f7d

Browse files
committed
优化代码
1 parent cea482a commit 9fd7f7d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

weixin-java-mp/src/main/java/me/chanjar/weixin/mp/api/impl/BaseWxMpServiceImpl.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,11 @@ public <T, E> T executeInternal(RequestExecutor<T, E> executor, String uri, E da
333333

334334
@Override
335335
public WxMpConfigStorage getWxMpConfigStorage() {
336+
if (this.configStorageMap.size() == 1) {
337+
// 只有一个公众号,直接返回其配置即可
338+
return this.configStorageMap.values().iterator().next();
339+
}
340+
336341
return this.configStorageMap.get(WxMpConfigStorageHolder.get());
337342
}
338343

0 commit comments

Comments
 (0)