diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysTenantServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysTenantServiceImpl.java index ba7186c..94cc5fb 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysTenantServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysTenantServiceImpl.java @@ -301,21 +301,21 @@ public class SysTenantServiceImpl extends BaseServiceImpl { - SysTenant tenant = MapstructUtils.convert(sysTenantBo, SysTenant.class); - if (ObjectUtil.isNull(tenant)) { - throw new ServiceException("租户的参数为空!"); - } - - //如果更换了套餐,则需要同步套餐sys_role_menu表 - SysTenantVo oldTenantVo = selectById(tenant.getTenantId()); - if (!oldTenantVo.getPackageId().equals(tenant.getPackageId())) { - boolean synced = syncTenantPackage(tenant.getTenantId(), tenant.getPackageId()); - if (!synced) { - throw new ServiceException("同步套餐失败!"); - } - } - Long loginUserId = LoginHelper.getUserId(); Date createTime = new Date(); tenant.setUpdateBy(loginUserId); @@ -418,8 +418,8 @@ public class SysTenantServiceImpl extends BaseServiceImpl { SysTenantPackage tenantPackage = tenantPackageMapper.selectOneById(packageId); - List roles = TenantHelper.ignore(() -> roleMapper.selectListByQuery( - QueryWrapper.create().from(SYS_ROLE).where(SYS_ROLE.TENANT_ID.eq(tenantId)))); + List roles = roleMapper.selectListByQuery( + QueryWrapper.create().from(SYS_ROLE).where(SYS_ROLE.TENANT_ID.eq(tenantId))); List roleIds = new ArrayList<>(roles.size() - 1); List menuIds = StringUtils.splitTo(tenantPackage.getMenuIds(), Convert::toLong); roles.forEach(role -> {