From e0e190671f97995e08546fcc0f4a2b270f223bf4 Mon Sep 17 00:00:00 2001 From: dataprince Date: Thu, 1 Feb 2024 21:03:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=97=A0=E6=B3=95=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E7=A7=9F=E6=88=B7=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/SysTenantServiceImpl.java | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) 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 -> {