用户资料也新增佩戴的荣誉字段

This commit is contained in:
tianfeng 2025-11-20 16:15:26 +08:00
parent 21519ad8c5
commit cb10413883
5 changed files with 24 additions and 2 deletions

View File

@ -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()

View File

@ -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);

View File

@ -155,6 +155,11 @@ public class UserProfile implements Serializable {
*/
private List<UserUseBadgeDTO> wearBadge;
/**
* 用户使用的荣誉.
*/
private List<UserUseBadgeDTO> wearHonor;
private String checkStatus;
/**

View File

@ -159,6 +159,11 @@ public class UserRunProfile implements Serializable {
*/
private List<UseBadgeDTO> wearBadge;
/**
* 用户使用的荣誉.
*/
private List<UseBadgeDTO> wearHonor;
/**
* 添加使用道具.
*/

View File

@ -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()));