用户资料也新增佩戴的荣誉字段
This commit is contained in:
parent
21519ad8c5
commit
cb10413883
@ -212,6 +212,11 @@ public class UserProfileDTO implements Serializable {
|
||||
*/
|
||||
private List<UserUseBadgeDTO> wearBadge;
|
||||
|
||||
/**
|
||||
* 用户使用的荣誉.
|
||||
*/
|
||||
private List<UserUseBadgeDTO> wearHonor;
|
||||
|
||||
public List<UserUsePropsDTO> filterProps(Predicate<UserUsePropsDTO> predicate) {
|
||||
return Optional.ofNullable(useProps)
|
||||
.map(usePropsEntities -> usePropsEntities.stream()
|
||||
|
||||
@ -53,7 +53,7 @@ public class EmptyRoomCleanTask {
|
||||
emptyRoomIds.add(room.getId());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("获取房间[{}]在线人数失败", room.getId(), e);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -61,6 +61,8 @@ public class EmptyRoomCleanTask {
|
||||
if (!CollectionUtils.isEmpty(emptyRoomIds)) {
|
||||
activeVoiceRoomService.removeByIds(emptyRoomIds);
|
||||
log.info("清理空房间完成,删除房间数量: {}, 房间ID: {}", emptyRoomIds.size(), emptyRoomIds);
|
||||
} else {
|
||||
log.warn("清理空房间失败, 无法获取房间在线人数");
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("清理空房间任务执行失败", e);
|
||||
|
||||
@ -155,6 +155,11 @@ public class UserProfile implements Serializable {
|
||||
*/
|
||||
private List<UserUseBadgeDTO> wearBadge;
|
||||
|
||||
/**
|
||||
* 用户使用的荣誉.
|
||||
*/
|
||||
private List<UserUseBadgeDTO> wearHonor;
|
||||
|
||||
private String checkStatus;
|
||||
|
||||
/**
|
||||
|
||||
@ -159,6 +159,11 @@ public class UserRunProfile implements Serializable {
|
||||
*/
|
||||
private List<UseBadgeDTO> wearBadge;
|
||||
|
||||
/**
|
||||
* 用户使用的荣誉.
|
||||
*/
|
||||
private List<UseBadgeDTO> wearHonor;
|
||||
|
||||
/**
|
||||
* 添加使用道具.
|
||||
*/
|
||||
|
||||
@ -26,6 +26,7 @@ import com.red.circle.other.infra.database.rds.service.props.RoomThemeUserBackpa
|
||||
import com.red.circle.other.infra.database.rds.service.props.RoomThemeUserCustomizeService;
|
||||
import com.red.circle.other.infra.database.rds.service.user.user.BaseInfoService;
|
||||
import com.red.circle.other.inner.enums.material.BadgeBackpackExpireType;
|
||||
import com.red.circle.other.inner.enums.material.BadgeConfigTypeEnum;
|
||||
import com.red.circle.other.inner.enums.material.PropsCommodityType;
|
||||
import com.red.circle.other.inner.model.dto.material.BadgeBackpackDTO;
|
||||
import com.red.circle.other.inner.model.dto.material.BadgeConfigDTO;
|
||||
@ -238,10 +239,14 @@ public class UserRunProfileTransportGatewayImpl implements UserRunProfileTranspo
|
||||
entry.getKey(),
|
||||
userBaseInfos.stream().map(BaseInfo::getId).collect(Collectors.toSet()));
|
||||
|
||||
|
||||
return userBaseInfos.stream().map(userBaseInfo -> {
|
||||
UserRunProfile newUserRunProfile = userProfileInfraConvertor.toUserRunProfile(
|
||||
userBaseInfo);
|
||||
newUserRunProfile.addWearBadge(userUseBadgeEntities.get(userBaseInfo.getId()));
|
||||
newUserRunProfile.addWearBadge(userUseBadgeEntities.get(userBaseInfo.getId()).stream()
|
||||
.filter(e -> !BadgeConfigTypeEnum.isHonorType(e.getType())).toList());
|
||||
newUserRunProfile.setWearHonor(userUseBadgeEntities.get(userBaseInfo.getId()).stream()
|
||||
.filter(e -> BadgeConfigTypeEnum.isHonorType(e.getType())).toList());
|
||||
newUserRunProfile.addUseProps(userUsePropsEntityMap.get(userBaseInfo.getId()));
|
||||
newUserRunProfile.addUseProps(userUseRoomTheme.get(userBaseInfo.getId()));
|
||||
newUserRunProfile.setOwnSpecialId(userSpecialIdMap.get(userBaseInfo.getId()));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user