|
|
@@ -293,11 +293,11 @@ public class ClientUserServiceImpl implements ClientUserSevice { |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public JsonResult deleteTenant(OidcTenantDto dto, LoginUser loginUser) { |
|
|
|
|
|
|
|
List<UserPo> list = clientUserMapper.selectByTenantId(dto.getId()); |
|
|
|
TenantPo tenantPo = tenantMapper.selectById(dto.getId()); |
|
|
|
List<UserPo> list = clientUserMapper.selectByTenantId(tenantPo.getUserId()); |
|
|
|
if (ObjectUtil.isNotEmpty(list)) { |
|
|
|
return JsonResult.error("该租户下含有关联用户,不能进行删除"); |
|
|
|
} |
|
|
|
TenantPo tenantPo = tenantMapper.selectById(dto.getId()); |
|
|
|
tenantPo.setEnabled(0); |
|
|
|
tenantMapper.updateById(tenantPo); |
|
|
|
UserPo userPo = clientUserMapper.selectByUserId(tenantPo.getUserId()); |