Commit ee53d2ad51c028c2ca5e5b56afec8ae8f8b482aa
1 parent
9ff67b47
修复租户套餐修改时,查询角色报错问题
Showing
1 changed file
with
1 additions
and
2 deletions
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/tenant/TenantServiceImpl.java
| @@ -34,7 +34,6 @@ import lombok.extern.slf4j.Slf4j; | @@ -34,7 +34,6 @@ import lombok.extern.slf4j.Slf4j; | ||
| 34 | import org.springframework.beans.factory.annotation.Autowired; | 34 | import org.springframework.beans.factory.annotation.Autowired; |
| 35 | import org.springframework.context.annotation.Lazy; | 35 | import org.springframework.context.annotation.Lazy; |
| 36 | import org.springframework.stereotype.Service; | 36 | import org.springframework.stereotype.Service; |
| 37 | -import org.springframework.transaction.annotation.Transactional; | ||
| 38 | import org.springframework.validation.annotation.Validated; | 37 | import org.springframework.validation.annotation.Validated; |
| 39 | 38 | ||
| 40 | import javax.annotation.Resource; | 39 | import javax.annotation.Resource; |
| @@ -175,7 +174,7 @@ public class TenantServiceImpl implements TenantService { | @@ -175,7 +174,7 @@ public class TenantServiceImpl implements TenantService { | ||
| 175 | public void updateTenantRoleMenu(Long tenantId, Set<Long> menuIds) { | 174 | public void updateTenantRoleMenu(Long tenantId, Set<Long> menuIds) { |
| 176 | TenantUtils.execute(tenantId, () -> { | 175 | TenantUtils.execute(tenantId, () -> { |
| 177 | // 获得所有角色 | 176 | // 获得所有角色 |
| 178 | - List<RoleDO> roles = roleService.getRoleListByStatus(null); | 177 | + List<RoleDO> roles = roleService.getRoleList(); |
| 179 | roles.forEach(role -> Assert.isTrue(tenantId.equals(role.getTenantId()), "角色({}/{}) 租户不匹配", | 178 | roles.forEach(role -> Assert.isTrue(tenantId.equals(role.getTenantId()), "角色({}/{}) 租户不匹配", |
| 180 | role.getId(), role.getTenantId(), tenantId)); // 兜底校验 | 179 | role.getId(), role.getTenantId(), tenantId)); // 兜底校验 |
| 181 | // 重新分配每个角色的权限 | 180 | // 重新分配每个角色的权限 |