From 9ee1215195ee2975c4ee2700a54fe768d4c2f3a5 Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Thu, 25 Sep 2025 14:48:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9EAPP=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=91=98=E8=BF=9B=E5=85=A5=E5=AF=86=E7=A0=81=E6=88=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/command/room/RoomEnterCmdExe.java | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/room/RoomEnterCmdExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/room/RoomEnterCmdExe.java index 1be9e223..00bfaf85 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/room/RoomEnterCmdExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/room/RoomEnterCmdExe.java @@ -27,6 +27,7 @@ import com.red.circle.other.infra.database.mongo.service.live.RoomProfileManager import com.red.circle.other.infra.database.mongo.service.live.RoomTouristService; import com.red.circle.other.infra.database.mongo.service.live.RoomUserBlacklistService; import com.red.circle.other.infra.database.rds.service.props.PropsRoomLockService; +import com.red.circle.other.infra.database.rds.service.sys.AdministratorAuthService; import com.red.circle.other.infra.database.rds.service.sys.AdministratorService; import com.red.circle.other.inner.asserts.RoomErrorCode; import com.red.circle.other.inner.asserts.user.UserErrorCode; @@ -81,6 +82,7 @@ public class RoomEnterCmdExe { private final TrtcClient trtcClient; private final UserAgoraTokenCacheService userAgoraTokenCacheService; private final TaskMqMessage taskMqMessage; + private final AdministratorAuthService administratorAuthService; public EntryRoomResponseCO execute(RoomEntryCmd cmd) { //checkEntryUserId(cmd); @@ -272,7 +274,13 @@ public class RoomEnterCmdExe { Objects.equals(manager.getEvent(), RoomEventEnum.CLOSE.name())); } - if (cmd.reqIsSelf(manager.getUserId()) || appAdmin) { + if (cmd.reqIsSelf(manager.getUserId())) { + return; + } + + // APP管理员可以进入密码房 + List authResources = administratorAuthService.listAuthResources(cmd.getReqUserId()); + if (authResources.contains("ROOM_PASSWORD")) { return; } @@ -286,17 +294,6 @@ public class RoomEnterCmdExe { ResponseAssert.isTrue(RoomErrorCode.PASSWORD_NOT_TRUE, Objects.equals(setting.getPassword(), cmd.getPwd())); } - -// // 2023/12/7 刘占洋需求: 2fun不严重区域冲突 -// if (Objects.equals(cmd.requireReqSysOriginEnum(), SysOriginPlatformEnum.TWO_FUN)) { -// return; -// } -// -// if (Objects.equals(cmd.requireReqSysOriginEnum(), SysOriginPlatformEnum.TARAB)) { -// return; -// } - // 区域不互通 -// ResponseAssert.isTrue(RoomErrorCode.NO_RIGHT_TO_ENTER, userRegionGateway.checkBusinessRegion(cmd.getReqUserId(), manager.getUserId())); } /**