Commit 48a40242 by 阳浪

数据隔离

parent 57a7bd07
...@@ -165,6 +165,16 @@ public class AuthServiceImpl implements AuthService { ...@@ -165,6 +165,16 @@ public class AuthServiceImpl implements AuthService {
// 缓存未命中 // 缓存未命中
// 1. 默认站点,企业下所有人员都可以访问 // 1. 默认站点,企业下所有人员都可以访问
Account account = accountMapper.selectById(accountId); Account account = accountMapper.selectById(accountId);
// 1. 查询角色
List<AuthzRole> roles = roleMapper.getByAccountId(accountId);
if(!CollectionUtils.isEmpty(roles)) {
List<Long> siteIdList = roles.stream().map(AuthzRole::getSiteId).distinct().collect(Collectors.toList());
siteIds.addAll(siteIdList);
}
Site site = new Site(); Site site = new Site();
site.setCompanyId(account.getCompanyId()); site.setCompanyId(account.getCompanyId());
site.setEnabled(Boolean.valueOf(true)); site.setEnabled(Boolean.valueOf(true));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment