Skip to content

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

@hacy-2020

Description

@hacy-2020

我的项目是租户使用的,
租户的支付配置是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());
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions