From 47d5cd8d023411c558656fb27bd3d250243a542a Mon Sep 17 00:00:00 2001 From: bynt Date: Fri, 12 May 2023 10:53:24 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B8=A2=E5=87=BA=E7=94=A8=E6=88=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/platform/service/impl/CompanyServiceImpl.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ad-platform-manage/ad-platform-management/src/main/java/com/baiye/modules/platform/service/impl/CompanyServiceImpl.java b/ad-platform-manage/ad-platform-management/src/main/java/com/baiye/modules/platform/service/impl/CompanyServiceImpl.java index 9603df17..0ee6a0e2 100644 --- a/ad-platform-manage/ad-platform-management/src/main/java/com/baiye/modules/platform/service/impl/CompanyServiceImpl.java +++ b/ad-platform-manage/ad-platform-management/src/main/java/com/baiye/modules/platform/service/impl/CompanyServiceImpl.java @@ -6,6 +6,7 @@ import cn.hutool.core.util.ObjectUtil; import com.baiye.constant.DefaultNumberConstants; import com.baiye.exception.BadRequestException; import com.baiye.exception.EntityExistException; +import com.baiye.feign.IRemoteAuthService; import com.baiye.model.enums.ResponseCode; import com.baiye.modules.platform.domain.Company; import com.baiye.modules.platform.domain.PayFatherTemplate; @@ -32,6 +33,7 @@ import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import java.util.Collections; import java.util.List; import java.util.Map; @@ -46,6 +48,8 @@ public class CompanyServiceImpl implements CompanyService { private final PayFatherTemplateService payFatherTemplateService; + private final IRemoteAuthService remoteAuthService; + private final CompanyRepository companyRepository; private final UserRepository userRepository; @@ -133,6 +137,8 @@ public class CompanyServiceImpl implements CompanyService { throw new BadRequestException(ResponseCode.USER_INFORMATION_ERROR.getDesc()); } userRepository.updateStatusById(Boolean.TRUE, company.getUserId()); + // 踢出用户 + this.remoteAuthService.delete(Collections.singleton(company.getUserId())); } if (status == DefaultNumberConstants.ONE_NUMBER) { userRepository.updateStatusByCompanyId(Boolean.TRUE, id);