diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/family/FamilyHomeListExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/family/FamilyHomeListExe.java index 00b1991..0cbcbf2 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/family/FamilyHomeListExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/family/FamilyHomeListExe.java @@ -14,17 +14,18 @@ import com.red.circle.other.infra.common.family.FamilyCommon; import com.red.circle.other.infra.database.mongo.entity.live.ActiveVoiceRoom; import com.red.circle.other.infra.database.mongo.entity.live.RoomProfileManager; import com.red.circle.other.infra.database.mongo.entity.user.status.OnlineUser; -import com.red.circle.other.infra.database.mongo.service.live.ActiveVoiceRoomService; -import com.red.circle.other.infra.database.mongo.service.live.RoomProfileManagerService; -import com.red.circle.other.infra.database.mongo.service.user.status.OnlineUserService; -import com.red.circle.other.infra.database.rds.entity.family.FamilyBaseInfo; -import com.red.circle.other.infra.database.rds.entity.family.FamilyMemberInfo; +import com.red.circle.other.infra.database.mongo.service.live.ActiveVoiceRoomService; +import com.red.circle.other.infra.database.mongo.service.live.RoomProfileManagerService; +import com.red.circle.other.infra.database.mongo.service.user.status.OnlineUserService; +import com.red.circle.other.infra.database.rds.entity.family.FamilyBaseInfo; +import com.red.circle.other.infra.database.rds.entity.family.FamilyMemberInfo; import com.red.circle.other.infra.database.rds.service.family.FamilyBaseInfoService; import com.red.circle.other.infra.database.rds.service.family.FamilyLevelExpService; import com.red.circle.other.infra.database.rds.service.family.FamilyMemberInfoService; -import com.red.circle.other.infra.enums.family.FamilyRoleEnum; -import com.red.circle.other.infra.enums.family.FamilyStatusEnum; -import com.red.circle.other.inner.model.dto.famliy.FamilyDetailsDTO; +import com.red.circle.other.infra.enums.family.FamilyRoleEnum; +import com.red.circle.other.infra.enums.family.FamilyStatusEnum; +import com.red.circle.other.inner.enums.room.RoomEventEnum; +import com.red.circle.other.inner.model.dto.famliy.FamilyDetailsDTO; import com.red.circle.tool.core.collection.CollectionUtils; import com.red.circle.tool.core.num.NumUtils; import java.math.BigDecimal; @@ -217,22 +218,33 @@ public class FamilyHomeListExe { rooms.stream().map(ActiveVoiceRoom::getId).collect(Collectors.toSet())); - return rooms.stream() - .map(room -> { - UserProfile profile = profileMap.get(room.getUserId()); - RoomProfileManager roomProfileManager = roomProfileManagerMap.getOrDefault(room.getId(), new RoomProfileManager()); - - return new FamilyHomeRoomCO() - .setRoomId(room.getId()) - .setRoomName(roomProfileManager.getRoomAccount()) - .setRoomCover(roomProfileManager.getRoomCover()) + return rooms.stream() + .map(room -> { + UserProfile profile = profileMap.get(room.getUserId()); + RoomProfileManager roomProfileManager = roomProfileManagerMap.get(room.getId()); + if (!isAvailableRoom(roomProfileManager)) { + return null; + } + + return new FamilyHomeRoomCO() + .setRoomId(room.getId()) + .setRoomName(roomProfileManager.getRoomAccount()) + .setRoomCover(roomProfileManager.getRoomCover()) .setCountryCode(roomProfileManager.getCountryCode()) .setCountryName(roomProfileManager.getCountryName()) .setRoomDesc(roomProfileManager.getRoomDesc()) - .setExistsPassword(StringUtils.isNotBlank(roomProfileManager.getSetting().getPassword())) - .setOnlineQuantity(room.getOnlineQuantity()); - }) - .collect(Collectors.toList()); - } - -} + .setExistsPassword(StringUtils.isNotBlank(roomProfileManager.getSetting().getPassword())) + .setOnlineQuantity(room.getOnlineQuantity()); + }) + .filter(Objects::nonNull) + .collect(Collectors.toList()); + } + + private boolean isAvailableRoom(RoomProfileManager roomProfileManager) { + return Objects.nonNull(roomProfileManager) + && !Objects.equals(roomProfileManager.getDel(), Boolean.TRUE) + && !Objects.equals(roomProfileManager.getEvent(), RoomEventEnum.CLOSE.name()) + && Objects.nonNull(roomProfileManager.getSetting()); + } + +} diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/party3rd/callback/trtc/DisbandRoomCallbackStrategy.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/party3rd/callback/trtc/DisbandRoomCallbackStrategy.java index 386bf32..88df84b 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/party3rd/callback/trtc/DisbandRoomCallbackStrategy.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/party3rd/callback/trtc/DisbandRoomCallbackStrategy.java @@ -1,10 +1,11 @@ package com.red.circle.other.app.command.party3rd.callback.trtc; -import com.red.circle.external.inner.model.callback.trtc.TrtcCallbackEvent; -import com.red.circle.other.infra.database.cache.service.other.RoomManagerCacheService; -import com.red.circle.other.infra.database.mongo.service.live.ActiveVoiceRoomService; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; +import com.red.circle.external.inner.model.callback.trtc.TrtcCallbackEvent; +import com.red.circle.other.infra.database.cache.service.other.RoomManagerCacheService; +import com.red.circle.other.infra.database.mongo.service.live.ActiveVoiceRoomService; +import com.red.circle.tool.core.text.StringUtils; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; /** @@ -20,11 +21,14 @@ public class DisbandRoomCallbackStrategy implements TrtcCallbackStrategy { private final ActiveVoiceRoomService activeVoiceRoomService; private final RoomManagerCacheService roomManagerCacheService; - @Override - public void doOperation(TrtcCallbackEvent event) { - // log.warn("解散房间:{}", event); - // activeVoiceRoomService.removeByRoomAccount(event.getRoomIdLongValve()); - // roomManagerCacheService.removeNumberPeople(event.getRoomIdLongValve()); - } - -} + @Override + public void doOperation(TrtcCallbackEvent event) { + log.warn("解散房间:{}", event); + if (StringUtils.isBlank(event.getRoomId())) { + return; + } + activeVoiceRoomService.removeByRoomAccount(event.getRoomId()); + roomManagerCacheService.removeNumberPeople(event.getRoomId()); + } + +} diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/room/query/RoomVoiceDiscoverQryExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/room/query/RoomVoiceDiscoverQryExe.java index f622c19..19f65a3 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/room/query/RoomVoiceDiscoverQryExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/room/query/RoomVoiceDiscoverQryExe.java @@ -76,12 +76,20 @@ public class RoomVoiceDiscoverQryExe { String region = cmd.isAllRegion() ? "ALL" : userRegionGateway.getRegionCode(cmd.requiredReqUserId()); UserProfile userProfile = userProfileGateway.getByUserId(cmd.requiredReqUserId()); - String key = cmd.requireReqSysOrigin() + region; - String regionsRoom = regionRoomCacheService.getRegionsRoom(key); - if (Objects.nonNull(regionsRoom)) { - List roomList = JSON.parseArray(regionsRoom, RoomVoiceProfileCO.class); - return roomList; - } + String key = cmd.requireReqSysOrigin() + region; + String regionsRoom = regionRoomCacheService.getRegionsRoom(key); + if (Objects.nonNull(regionsRoom)) { + List roomList = JSON.parseArray(regionsRoom, RoomVoiceProfileCO.class); + if (CollectionUtils.isEmpty(roomList)) { + return CollectionUtils.newArrayList(); + } + List availableRooms = roomVoiceProfileCommon + .filterAvailableRoomProfiles(roomList); + if (availableRooms.size() != roomList.size()) { + regionRoomCacheService.remove(key); + } + return availableRooms; + } String userCountryCode = userProfile != null ? userProfile.getCountryCode() : null; List activeVoiceRooms = activeVoiceRoomService.listDiscover(cmd.requireReqSysOrigin(), cmd.isAllRegion(), region, userCountryCode, 50); diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/room/query/UserJoinedRoomsQryExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/room/query/UserJoinedRoomsQryExe.java index 0d2e887..0f48b67 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/room/query/UserJoinedRoomsQryExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/room/query/UserJoinedRoomsQryExe.java @@ -3,14 +3,15 @@ package com.red.circle.other.app.command.room.query; import com.google.common.collect.Lists; import com.red.circle.common.business.dto.cmd.app.AppFlowCmd; import com.red.circle.other.app.common.room.RoomVoiceProfileCommon; -import com.red.circle.other.app.dto.clientobject.room.RoomBrowseRecordsV2CO; -import com.red.circle.other.app.dto.clientobject.room.RoomVoiceProfileCO; -import com.red.circle.other.infra.database.rds.entity.live.RoomMember; -import com.red.circle.other.infra.database.rds.service.live.RoomMemberService; -import com.red.circle.tool.core.collection.CollectionUtils; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; +import com.red.circle.other.app.dto.clientobject.room.RoomBrowseRecordsV2CO; +import com.red.circle.other.app.dto.clientobject.room.RoomVoiceProfileCO; +import com.red.circle.other.infra.database.rds.entity.live.RoomMember; +import com.red.circle.other.infra.database.rds.service.live.RoomMemberService; +import com.red.circle.tool.core.collection.CollectionUtils; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.stream.Collectors; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Component; @@ -32,11 +33,12 @@ public class UserJoinedRoomsQryExe { if (CollectionUtils.isEmpty(roomMembers)) { return Lists.newArrayList(); } - Map roomProfileMap = roomVoiceProfileCommon.mapRoomVoiceProfile( - roomMembers.stream().map(RoomMember::getRoomId).collect(Collectors.toSet())); - return roomMembers.stream().map(roomMember -> new RoomBrowseRecordsV2CO() - .setId(roomMember.getId()) - .setRoomProfile(roomProfileMap.get(roomMember.getRoomId()))) - .collect(Collectors.toList()); - } -} + Map roomProfileMap = roomVoiceProfileCommon.mapRoomVoiceProfile( + roomMembers.stream().map(RoomMember::getRoomId).collect(Collectors.toSet())); + return roomMembers.stream().map(roomMember -> new RoomBrowseRecordsV2CO() + .setId(roomMember.getId()) + .setRoomProfile(roomProfileMap.get(roomMember.getRoomId()))) + .filter(record -> Objects.nonNull(record.getRoomProfile())) + .collect(Collectors.toList()); + } +} diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/room/query/UserTraceRoomsQryExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/room/query/UserTraceRoomsQryExe.java index d35ec61..8708844 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/room/query/UserTraceRoomsQryExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/room/query/UserTraceRoomsQryExe.java @@ -45,18 +45,19 @@ public class UserTraceRoomsQryExe { Map roomProfileMap = roomVoiceProfileCommon.mapRoomVoiceProfile( roomTourists.stream().map(RoomTourist::getRoomId).collect(Collectors.toSet())); - return roomTourists.stream().filter(Objects::nonNull) - .map(roomTourist -> { - RoomVoiceProfileCO profileCO = roomProfileMap.get(roomTourist.getRoomId()); - if (profileCO != null) { - profileCO.setRoomGameIcon(coverMap.get(roomTourist.getRoomId())); + return roomTourists.stream().filter(Objects::nonNull) + .map(roomTourist -> { + RoomVoiceProfileCO profileCO = roomProfileMap.get(roomTourist.getRoomId()); + if (profileCO != null) { + profileCO.setRoomGameIcon(coverMap.get(roomTourist.getRoomId())); } - return new RoomBrowseRecordsV2CO() - .setId(roomTourist.getTimeId()) - .setRoomProfile(profileCO); - } - ).collect(Collectors.toList()); - } - -} + return new RoomBrowseRecordsV2CO() + .setId(roomTourist.getTimeId()) + .setRoomProfile(profileCO); + } + ).filter(record -> Objects.nonNull(record.getRoomProfile())) + .collect(Collectors.toList()); + } + +} diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/common/room/RoomVoiceProfileCommon.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/common/room/RoomVoiceProfileCommon.java index d083bdd..b044419 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/common/room/RoomVoiceProfileCommon.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/common/room/RoomVoiceProfileCommon.java @@ -8,11 +8,12 @@ import com.red.circle.other.app.convertor.live.RoomProfileAppConvertor; import com.red.circle.other.app.convertor.user.UserProfileAppConvertor; import com.red.circle.other.app.dto.clientobject.room.RoomVoiceProfileCO; import com.red.circle.other.domain.gateway.user.UserProfileGateway; -import com.red.circle.other.infra.database.mongo.entity.live.ActiveVoiceRoom; -import com.red.circle.other.infra.database.mongo.entity.live.RoomProfileManager; -import com.red.circle.other.infra.database.mongo.service.live.RoomProfileManagerService; -import com.red.circle.other.inner.model.dto.material.UseBadgeDTO; -import com.red.circle.other.inner.model.dto.user.UserProfileDTO; +import com.red.circle.other.infra.database.mongo.entity.live.ActiveVoiceRoom; +import com.red.circle.other.infra.database.mongo.entity.live.RoomProfileManager; +import com.red.circle.other.infra.database.mongo.service.live.RoomProfileManagerService; +import com.red.circle.other.inner.enums.room.RoomEventEnum; +import com.red.circle.other.inner.model.dto.material.UseBadgeDTO; +import com.red.circle.other.inner.model.dto.user.UserProfileDTO; import com.red.circle.tool.core.collection.CollectionUtils; import com.red.circle.tool.core.text.StringUtils; import java.util.List; @@ -43,22 +44,31 @@ public class RoomVoiceProfileCommon { return listRoomVoiceProfilesV2(roomProfileManagerService.listByRoomIds(roomIds)); } - public List listRoomVoiceProfilesV2( - List roomProfileManagers) { - if (CollectionUtils.isEmpty(roomProfileManagers)) { - return Lists.newArrayList(); - } - - Map userProfileMap = userProfileAppConvertor.toMapUserProfileDTO( - userProfileGateway.mapByUserIds( - roomProfileManagers.stream().map(RoomProfileManager::getUserId) - .collect(Collectors.toSet()))); - - return roomProfileManagers.stream() - .map(roomManager -> mergeRoomVoiceProfile(userProfileMap.get(roomManager.getUserId()), - roomManager)) - .toList(); - } + public List listRoomVoiceProfilesV2( + List roomProfileManagers) { + if (CollectionUtils.isEmpty(roomProfileManagers)) { + return Lists.newArrayList(); + } + + List availableRooms = roomProfileManagers.stream() + .filter(this::isRoomAvailable) + .toList(); + + if (CollectionUtils.isEmpty(availableRooms)) { + return Lists.newArrayList(); + } + + Map userProfileMap = userProfileAppConvertor.toMapUserProfileDTO( + userProfileGateway.mapByUserIds( + availableRooms.stream().map(RoomProfileManager::getUserId) + .collect(Collectors.toSet()))); + + return availableRooms.stream() + .map(roomManager -> mergeRoomVoiceProfile(userProfileMap.get(roomManager.getUserId()), + roomManager)) + .filter(Objects::nonNull) + .toList(); + } public Map mapRoomVoiceProfile(Set roomIds) { if (CollectionUtils.isEmpty(roomIds)) { @@ -70,25 +80,36 @@ public class RoomVoiceProfileCommon { .orElse(Maps.newHashMap()); } - public RoomVoiceProfileCO getAvailableByRoomAccount(SysOriginPlatformEnum sysOrigin, - String roomAccount) { + public RoomVoiceProfileCO getAvailableByRoomAccount(SysOriginPlatformEnum sysOrigin, + String roomAccount) { return Optional.ofNullable( userProfileAppConvertor.toUserProfileDTO( userProfileGateway.getByAccount(sysOrigin.name(), roomAccount) ) - ) - .map(userProfile -> { - RoomProfileManager manager = roomProfileManagerService.getByUserId(userProfile.getId()); - if (Objects.nonNull(manager)) { - if (Objects.equals(manager.getDel(), Boolean.TRUE)) { - return null; - } - return mergeRoomVoiceProfile(userProfile, manager); - } - - return null; - }).orElse(null); - } + ) + .map(userProfile -> { + RoomProfileManager manager = roomProfileManagerService.getByUserId(userProfile.getId()); + if (isRoomAvailable(manager)) { + return mergeRoomVoiceProfile(userProfile, manager); + } + + return null; + }).orElse(null); + } + + public List filterAvailableRoomProfiles( + List roomVoiceProfiles) { + if (CollectionUtils.isEmpty(roomVoiceProfiles)) { + return Lists.newArrayList(); + } + + Map roomProfileManagerMap = roomProfileManagerService.mapByRoomIds( + roomVoiceProfiles.stream().map(RoomVoiceProfileCO::getId).collect(Collectors.toSet())); + + return roomVoiceProfiles.stream() + .filter(room -> isRoomAvailable(roomProfileManagerMap.get(room.getId()))) + .toList(); + } public List toListRoomVoiceProfileCO(List activeVoiceRooms) { if (CollectionUtils.isEmpty(activeVoiceRooms)) { @@ -136,12 +157,12 @@ public class RoomVoiceProfileCommon { return roomVoiceProfile; } - private RoomVoiceProfileCO mergeRoomVoiceProfile(UserProfileDTO userProfile, - RoomProfileManager manager) { - - if (Objects.isNull(manager)) { - return null; - } + private RoomVoiceProfileCO mergeRoomVoiceProfile(UserProfileDTO userProfile, + RoomProfileManager manager) { + + if (!isRoomAvailable(manager)) { + return null; + } RoomVoiceProfileCO roomVoiceProfile = roomProfileAppConvertor.toRoomVoiceProfileCO(manager); roomVoiceProfile.setUserProfile(userProfile); @@ -155,8 +176,14 @@ public class RoomVoiceProfileCommon { ); // 兼容Android进入自己房间错误 roomVoiceProfile.setLayoutKey(""); - return roomVoiceProfile; - } - - -} + return roomVoiceProfile; + } + + private boolean isRoomAvailable(RoomProfileManager manager) { + return Objects.nonNull(manager) + && !Objects.equals(manager.getDel(), Boolean.TRUE) + && !Objects.equals(manager.getEvent(), RoomEventEnum.CLOSE.name()); + } + + +} diff --git a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/mongo/service/live/impl/RoomProfileManagerServiceImpl.java b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/mongo/service/live/impl/RoomProfileManagerServiceImpl.java index af7b94d..c9eae41 100644 --- a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/mongo/service/live/impl/RoomProfileManagerServiceImpl.java +++ b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/mongo/service/live/impl/RoomProfileManagerServiceImpl.java @@ -5,14 +5,17 @@ import com.google.common.collect.Lists; import com.mongodb.BasicDBObject; import com.red.circle.common.business.core.ReplaceString; import com.red.circle.common.business.core.SensitiveWordFilter; -import com.red.circle.framework.core.asserts.ResponseAssert; -import com.red.circle.other.infra.database.mongo.entity.live.RoomCounter; -import com.red.circle.other.infra.database.mongo.entity.live.RoomProfile; -import com.red.circle.other.infra.database.mongo.entity.live.RoomProfileManager; -import com.red.circle.other.infra.database.mongo.entity.live.RoomSetting; -import com.red.circle.other.infra.database.mongo.service.live.RoomProfileManagerService; -import com.red.circle.other.inner.asserts.DynamicErrorCode; -import com.red.circle.other.inner.model.cmd.room.RoomProfileOpsQryCmd; +import com.red.circle.framework.core.asserts.ResponseAssert; +import com.red.circle.other.infra.database.cache.service.other.RoomManagerCacheService; +import com.red.circle.other.infra.database.mongo.entity.live.RoomCounter; +import com.red.circle.other.infra.database.mongo.entity.live.RoomProfile; +import com.red.circle.other.infra.database.mongo.entity.live.RoomProfileManager; +import com.red.circle.other.infra.database.mongo.entity.live.RoomSetting; +import com.red.circle.other.infra.database.mongo.service.live.ActiveVoiceRoomService; +import com.red.circle.other.infra.database.mongo.service.live.RoomProfileManagerService; +import com.red.circle.other.inner.asserts.DynamicErrorCode; +import com.red.circle.other.inner.enums.room.RoomEventEnum; +import com.red.circle.other.inner.model.cmd.room.RoomProfileOpsQryCmd; import com.red.circle.other.inner.model.dto.material.UseBadgeDTO; import com.red.circle.other.inner.model.dto.material.UsePropsDTO; import com.red.circle.tool.core.collection.CollectionUtils; @@ -48,10 +51,12 @@ import org.springframework.stereotype.Service; @Service @RequiredArgsConstructor @Slf4j -public class RoomProfileManagerServiceImpl implements RoomProfileManagerService { - - private final MongoTemplate mongoTemplate; - private final RedisTemplate redisTemplate; +public class RoomProfileManagerServiceImpl implements RoomProfileManagerService { + + private final MongoTemplate mongoTemplate; + private final RedisTemplate redisTemplate; + private final ActiveVoiceRoomService activeVoiceRoomService; + private final RoomManagerCacheService roomManagerCacheService; /** * Redis缓存Key前缀 @@ -439,16 +444,23 @@ public class RoomProfileManagerServiceImpl implements RoomProfileManagerService } @Override - public Boolean updateSelectiveProfile(RoomProfile roomProfile) { - RoomProfileManager profile = getById(roomProfile.getId()); - if (Objects.isNull(profile)) { - return Boolean.FALSE; - } - mongoTemplate.updateFirst(Query.query(Criteria.where("id").is(roomProfile.getId())), - getUpdateSelectiveProfile(roomProfile), - RoomProfileManager.class); - return Boolean.TRUE; - } + public Boolean updateSelectiveProfile(RoomProfile roomProfile) { + RoomProfileManager profile = getById(roomProfile.getId()); + if (Objects.isNull(profile)) { + return Boolean.FALSE; + } + mongoTemplate.updateFirst(Query.query(Criteria.where("id").is(roomProfile.getId())), + getUpdateSelectiveProfile(roomProfile), + RoomProfileManager.class); + if (Objects.equals(roomProfile.getEvent(), RoomEventEnum.CLOSE.name()) + || Objects.equals(roomProfile.getDel(), Boolean.TRUE)) { + if (StringUtils.isNotBlank(profile.getRoomAccount())) { + activeVoiceRoomService.removeByRoomAccount(profile.getRoomAccount()); + roomManagerCacheService.removeNumberPeople(profile.getRoomAccount()); + } + } + return Boolean.TRUE; + } @Override public void updateSelectiveSetting(Long roomId, RoomSetting roomSetting) {