From bf9dcb1848e26cf01a41df4fbd60aa855bb80451 Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Tue, 11 Nov 2025 10:21:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=90=E4=B8=BA=E4=B8=BB=E6=92=AD=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E4=B8=BB=E6=92=AD=E8=AE=BE=E5=A4=87=E6=8C=87=E7=BA=B9?= =?UTF-8?q?=E6=A0=A1=E9=AA=8C=EF=BC=9A=E5=90=8E=E5=8F=B0=EF=BC=8C=E9=82=80?= =?UTF-8?q?=E8=AF=B7=EF=BC=8C=E6=88=90=E4=B8=BA=E4=BB=A3=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../circle/other/app/command/team/AgentInviteHostExe.java | 8 +++++++- .../service/team/impl/TeamProfileClientServiceImpl.java | 7 +++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/team/AgentInviteHostExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/team/AgentInviteHostExe.java index fc157b6d..c427f240 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/team/AgentInviteHostExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/team/AgentInviteHostExe.java @@ -13,6 +13,7 @@ import com.red.circle.other.app.dto.clientobject.team.BdInviteMessageCO; import com.red.circle.other.app.dto.cmd.team.*; import com.red.circle.other.app.util.OfficialNoticeUtils; import com.red.circle.other.domain.gateway.user.UserProfileGateway; +import com.red.circle.other.domain.gateway.user.ability.RegisterDeviceGateway; import com.red.circle.other.infra.database.cache.service.other.EnumConfigCacheService; import com.red.circle.other.infra.database.mongo.entity.team.bd.BdInviteAgentMessage; import com.red.circle.other.infra.database.mongo.entity.team.bd.MessageInviteGroup; @@ -51,7 +52,7 @@ public class AgentInviteHostExe { private final TeamMemberService teamMemberService; private final TeamProfileService teamProfileService; private final OfficialNoticeClient officialNoticeClient; - private final EnumConfigCacheService enumConfigCacheService; + private final RegisterDeviceGateway registerDeviceGateway; private final UserProfileAppConvertor userProfileAppConvertor; private final BdInviteAgentMessageService bdInviteAgentMessageService; @@ -165,6 +166,11 @@ public class AgentInviteHostExe { cmd.getStatus(), MessageInviteGroup.AGENT_INVITE_HOST.name())); if (Objects.equals(cmd.getStatus(), 1)) { + // 主播设备指纹校验 + Boolean hasAnchorWithSameDevice = registerDeviceGateway.checkDeviceFingerprintHasAnchor( + message.getInviteUserId()); + ResponseAssert.isFalse(TeamErrorCode.DEVICE_FINGERPRINT_USED_BY_ANCHOR, hasAnchorWithSameDevice); + teamMemberService.addMember(new TeamMember() .setSortId(IdWorkerUtils.getId()) .setSysOrigin(cmd.requireReqSysOrigin()) diff --git a/rc-service/rc-service-other/other-inner-endpoint/src/main/java/com/red/circle/other/app/inner/service/team/impl/TeamProfileClientServiceImpl.java b/rc-service/rc-service-other/other-inner-endpoint/src/main/java/com/red/circle/other/app/inner/service/team/impl/TeamProfileClientServiceImpl.java index a3ef849c..fa04d281 100644 --- a/rc-service/rc-service-other/other-inner-endpoint/src/main/java/com/red/circle/other/app/inner/service/team/impl/TeamProfileClientServiceImpl.java +++ b/rc-service/rc-service-other/other-inner-endpoint/src/main/java/com/red/circle/other/app/inner/service/team/impl/TeamProfileClientServiceImpl.java @@ -15,6 +15,7 @@ import com.red.circle.mq.business.model.event.team.TeamSalaryCountEvent; import com.red.circle.mq.rocket.business.streams.TeamSalaryCountSink; import com.red.circle.other.app.inner.service.team.TeamProfileClientService; import com.red.circle.other.domain.gateway.user.UserProfileGateway; +import com.red.circle.other.domain.gateway.user.ability.RegisterDeviceGateway; import com.red.circle.other.domain.model.user.UserProfile; import com.red.circle.other.infra.convertor.team.TeamInfraConvertor; import com.red.circle.other.infra.database.mongo.dto.team.TeamBillSettleResult; @@ -117,6 +118,7 @@ public class TeamProfileClientServiceImpl implements TeamProfileClientService { private final TeamApplicationProcessApprovalService teamApplicationProcessApprovalService; private final BillDiamondBalanceService billDiamondBalanceService; private final BillDiamondBalanceDetailsService billDiamondBalanceDetailsService; + private final RegisterDeviceGateway registerDeviceGateway; @Override public List listByIds(Set ids) { @@ -213,6 +215,11 @@ public class TeamProfileClientServiceImpl implements TeamProfileClientService { businessDevelopmentBaseInfoService.checkBD(cmd.getBdUserId())); } + // 主播设备指纹校验 + Boolean hasAnchorWithSameDevice = registerDeviceGateway.checkDeviceFingerprintHasAnchor( + userProfile.getId()); + ResponseAssert.isFalse(TeamErrorCode.DEVICE_FINGERPRINT_USED_BY_ANCHOR, hasAnchorWithSameDevice); + String key = "CreateTeam:" + userProfile.getId(); ResponseAssert.isTrue(CommonErrorCode.OPERATION_CONFLICT, redisService.lock(key, 60));