|
|
@ -86,11 +86,11 @@ public class TenantController { |
|
|
|
@PreAuthorize("@pms.hasPermission('tenant_del')") |
|
|
|
@PreAuthorize("@pms.hasPermission('tenant_del')") |
|
|
|
public R remove(@PathVariable String[] ids) { |
|
|
|
public R remove(@PathVariable String[] ids) { |
|
|
|
// todo: 防止核心多租户删除,暂时处理手段
|
|
|
|
// todo: 防止核心多租户删除,暂时处理手段
|
|
|
|
if(ArrayUtil.contains(ids, "1523396238015426562")){ |
|
|
|
if(ArrayUtil.contains(ids, "1523396238015426562")) { |
|
|
|
return R.error("不允许删除核心多租户数据!"); |
|
|
|
return R.error("不允许删除核心多租户数据!"); |
|
|
|
} |
|
|
|
} |
|
|
|
if (roleTenantService.count(new LambdaQueryWrapper<RoleTenant>().in(RoleTenant::getMultiTenantId, ids)) > 0) { |
|
|
|
if(roleTenantService.count(new LambdaQueryWrapper<RoleTenant>().in(RoleTenant::getMultiTenantId, ids)) > 0) { |
|
|
|
return R.error("多租户已分配,不允许删除"); |
|
|
|
return R.error("多租户已分配,不允许删除!"); |
|
|
|
} |
|
|
|
} |
|
|
|
tenantService.removeByIds(Arrays.asList(ids)); |
|
|
|
tenantService.removeByIds(Arrays.asList(ids)); |
|
|
|
return R.ok(); |
|
|
|
return R.ok(); |
|
|
|