Commit ee53d2ad51c028c2ca5e5b56afec8ae8f8b482aa

Authored by YunaiV
1 parent 9ff67b47

修复租户套餐修改时,查询角色报错问题

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 34 import org.springframework.beans.factory.annotation.Autowired;
35 35 import org.springframework.context.annotation.Lazy;
36 36 import org.springframework.stereotype.Service;
37   -import org.springframework.transaction.annotation.Transactional;
38 37 import org.springframework.validation.annotation.Validated;
39 38  
40 39 import javax.annotation.Resource;
... ... @@ -175,7 +174,7 @@ public class TenantServiceImpl implements TenantService {
175 174 public void updateTenantRoleMenu(Long tenantId, Set<Long> menuIds) {
176 175 TenantUtils.execute(tenantId, () -> {
177 176 // 获得所有角色
178   - List<RoleDO> roles = roleService.getRoleListByStatus(null);
  177 + List<RoleDO> roles = roleService.getRoleList();
179 178 roles.forEach(role -> Assert.isTrue(tenantId.equals(role.getTenantId()), "角色({}/{}) 租户不匹配",
180 179 role.getId(), role.getTenantId(), tenantId)); // 兜底校验
181 180 // 重新分配每个角色的权限
... ...