创建房间默认名称处理
This commit is contained in:
parent
9c61d603ef
commit
dd7017e728
@ -15,6 +15,7 @@ import com.red.circle.other.app.dto.clientobject.room.RoomVoiceProfileCO;
|
|||||||
import com.red.circle.other.domain.gateway.props.PropsNobleVipGateway;
|
import com.red.circle.other.domain.gateway.props.PropsNobleVipGateway;
|
||||||
import com.red.circle.other.domain.gateway.user.UserProfileGateway;
|
import com.red.circle.other.domain.gateway.user.UserProfileGateway;
|
||||||
import com.red.circle.other.domain.model.user.UserProfile;
|
import com.red.circle.other.domain.model.user.UserProfile;
|
||||||
|
import com.red.circle.other.infra.database.cache.service.other.EnumConfigCacheService;
|
||||||
import com.red.circle.other.infra.database.mongo.entity.live.RoomCounter;
|
import com.red.circle.other.infra.database.mongo.entity.live.RoomCounter;
|
||||||
import com.red.circle.other.infra.database.mongo.entity.live.RoomProfileManager;
|
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.entity.live.RoomSetting;
|
||||||
@ -26,6 +27,7 @@ import com.red.circle.other.infra.database.rds.service.sys.SysCountryCodeService
|
|||||||
import com.red.circle.other.inner.asserts.DynamicErrorCode;
|
import com.red.circle.other.inner.asserts.DynamicErrorCode;
|
||||||
import com.red.circle.other.inner.asserts.RoomErrorCode;
|
import com.red.circle.other.inner.asserts.RoomErrorCode;
|
||||||
import com.red.circle.other.inner.asserts.user.UserErrorCode;
|
import com.red.circle.other.inner.asserts.user.UserErrorCode;
|
||||||
|
import com.red.circle.other.inner.enums.config.EnumConfigKey;
|
||||||
import com.red.circle.other.inner.enums.live.RoomUserRolesEnum;
|
import com.red.circle.other.inner.enums.live.RoomUserRolesEnum;
|
||||||
import com.red.circle.other.inner.enums.room.RoomEventEnum;
|
import com.red.circle.other.inner.enums.room.RoomEventEnum;
|
||||||
import com.red.circle.other.inner.model.dto.material.props.PropsNobleVipAbilityDTO;
|
import com.red.circle.other.inner.model.dto.material.props.PropsNobleVipAbilityDTO;
|
||||||
@ -59,6 +61,7 @@ public class LiveVoiceRoomCreateCmdExe {
|
|||||||
private final UserProfileAppConvertor userProfileAppConvertor;
|
private final UserProfileAppConvertor userProfileAppConvertor;
|
||||||
private final RoomProfileAppConvertor roomProfileAppConvertor;
|
private final RoomProfileAppConvertor roomProfileAppConvertor;
|
||||||
private final RoomProfileManagerService roomProfileManagerService;
|
private final RoomProfileManagerService roomProfileManagerService;
|
||||||
|
private final EnumConfigCacheService enumConfigCacheService;
|
||||||
|
|
||||||
public RoomVoiceProfileCO execute(AppExtCommand cmd) {
|
public RoomVoiceProfileCO execute(AppExtCommand cmd) {
|
||||||
// 房间已存在
|
// 房间已存在
|
||||||
@ -102,7 +105,7 @@ public class LiveVoiceRoomCreateCmdExe {
|
|||||||
roomProfile.setRoomAccount(userProfile.getAccount());
|
roomProfile.setRoomAccount(userProfile.getAccount());
|
||||||
roomProfile.setUserId(userProfile.getId());
|
roomProfile.setUserId(userProfile.getId());
|
||||||
roomProfile.setRoomCover(getRoomCover(userProfile));
|
roomProfile.setRoomCover(getRoomCover(userProfile));
|
||||||
roomProfile.setRoomName(userProfile.getUserNickname());
|
roomProfile.setRoomName("room" + userProfile.getAccount());
|
||||||
roomProfile.setRoomDesc(I18nMessageUtils.get("ROOM_DESC.body"));
|
roomProfile.setRoomDesc(I18nMessageUtils.get("ROOM_DESC.body"));
|
||||||
roomProfile.setEvent(RoomEventEnum.WAITING_CONFIRMED.name());
|
roomProfile.setEvent(RoomEventEnum.WAITING_CONFIRMED.name());
|
||||||
roomProfile.setSysOrigin(cmd.requireReqSysOrigin());
|
roomProfile.setSysOrigin(cmd.requireReqSysOrigin());
|
||||||
@ -158,9 +161,6 @@ public class LiveVoiceRoomCreateCmdExe {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private String getRoomCover(UserProfile userProfile) {
|
private String getRoomCover(UserProfile userProfile) {
|
||||||
return StringUtils.isNotBlank(userProfile.getUserAvatar())
|
return enumConfigCacheService.getValue(EnumConfigKey.DEFAULT_ROOM_COVER, userProfile.getOriginSys());
|
||||||
? userProfile.getUserAvatar()
|
|
||||||
: StringPool.EMPTY;
|
|
||||||
// : enumConfigService.getValue(DefaultEnumConfigEnum.DEFAULT_ROOM_COVER);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user