Browse Source

更新

tags/v2.4.0
xiaoying 1 year ago
parent
commit
8a0e16f01a
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      tuoheng_oidc_admin/src/main/java/com/tuoheng/service/impl/ClientUserServiceImpl.java

+ 2
- 2
tuoheng_oidc_admin/src/main/java/com/tuoheng/service/impl/ClientUserServiceImpl.java View File

@@ -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());

Loading…
Cancel
Save