feat(REQ-2186): 创建超管逻辑调整
This commit is contained in:
parent
ab0ad51a9a
commit
f178ea55a5
@ -217,18 +217,18 @@ public class RoleUserService implements SaasRoleUserService {
|
||||
private SaasRole findSuperAdmin(Long workspaceId, Long ouId, Integer workspaceType) {
|
||||
//优先取租户超管 没有再取标准角色超管
|
||||
//租户超管
|
||||
SaasRole superAdmin = saasRoleDao
|
||||
return saasRoleDao
|
||||
.findRoleByTypeAndWorkspaceIdAndOuId(RoleTypeEnum.SUPER_ADMIN.getValue(),
|
||||
workspaceId, ouId);
|
||||
if (superAdmin != null) {
|
||||
return superAdmin;
|
||||
}
|
||||
// if (superAdmin != null) {
|
||||
// return superAdmin;
|
||||
// }
|
||||
//标准角超管
|
||||
String superAdminCode = superAdminCodes.get(workspaceType);
|
||||
if (StrUtil.isBlank(superAdminCode)) {
|
||||
throw new ServiceException("租户类型[" + workspaceType + "]未配置超管编码");
|
||||
}
|
||||
return saasRoleDao.lambdaQuery().eq(SaasRole::getRoleCode, superAdminCode).one();
|
||||
// String superAdminCode = superAdminCodes.get(workspaceType);
|
||||
// if (StrUtil.isBlank(superAdminCode)) {
|
||||
// throw new ServiceException("租户类型[" + workspaceType + "]未配置超管编码");
|
||||
// }
|
||||
// return saasRoleDao.lambdaQuery().eq(SaasRole::getRoleCode, superAdminCode).one();
|
||||
}
|
||||
|
||||
private void checkRoleName(String name, Long workspaceId, Long ouId) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user