dromara / dromara/payment-spring-boot

WechatMetaContainer.addWechatMetas 后加的 WechatMetaContainer.getTenantIds 不能返回

Open
#133 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
851
Forks
181
PR merge metrics
No merged PRs in 30d

Description

我的项目是租户使用的,
租户的支付配置是WechatMetaContainer.addWechatMetas 动态添加进来的

WechatMetaContainer.getTenantIds 无法返回后加的

建议:
/**
* Gets properties keys.
*
* @return the properties keys
*/
public Set getTenantIds() {
return wechatTenantService.loadTenants()
.stream()
.map(WechatMetaBean::getTenantId)
.collect(Collectors.toSet());
}

这个方法改成:
/**
* Gets properties keys.
*
* @return the properties keys
*/
public Set getTenantIds() {
if (!wechatMetaBeanMap.isEmpty()){
return wechatMetaBeanMap.keySet();
}
return wechatTenantService.loadTenants()
.stream()
.map(WechatMetaBean::getTenantId)
.collect(Collectors.toSet());
}

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.