修正无法修改租户的问题
This commit is contained in:
parent
5e8a8f6cd9
commit
e0e190671f
@ -301,7 +301,6 @@ public class SysTenantServiceImpl extends BaseServiceImpl<SysTenantMapper, SysTe
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean update(SysTenantBo sysTenantBo) {
|
||||
return TenantHelper.ignore(() -> {
|
||||
SysTenant tenant = MapstructUtils.convert(sysTenantBo, SysTenant.class);
|
||||
if (ObjectUtil.isNull(tenant)) {
|
||||
throw new ServiceException("租户的参数为空!");
|
||||
@ -316,6 +315,7 @@ public class SysTenantServiceImpl extends BaseServiceImpl<SysTenantMapper, SysTe
|
||||
}
|
||||
}
|
||||
|
||||
return TenantHelper.ignore(() -> {
|
||||
Long loginUserId = LoginHelper.getUserId();
|
||||
Date createTime = new Date();
|
||||
tenant.setUpdateBy(loginUserId);
|
||||
@ -418,8 +418,8 @@ public class SysTenantServiceImpl extends BaseServiceImpl<SysTenantMapper, SysTe
|
||||
public boolean syncTenantPackage(Long tenantId, Long packageId) {
|
||||
return TenantHelper.ignore(() -> {
|
||||
SysTenantPackage tenantPackage = tenantPackageMapper.selectOneById(packageId);
|
||||
List<SysRole> roles = TenantHelper.ignore(() -> roleMapper.selectListByQuery(
|
||||
QueryWrapper.create().from(SYS_ROLE).where(SYS_ROLE.TENANT_ID.eq(tenantId))));
|
||||
List<SysRole> roles = roleMapper.selectListByQuery(
|
||||
QueryWrapper.create().from(SYS_ROLE).where(SYS_ROLE.TENANT_ID.eq(tenantId)));
|
||||
List<Long> roleIds = new ArrayList<>(roles.size() - 1);
|
||||
List<Long> menuIds = StringUtils.splitTo(tenantPackage.getMenuIds(), Convert::toLong);
|
||||
roles.forEach(role -> {
|
||||
|
Loading…
Reference in New Issue
Block a user