diff --git a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/gateway/user/UserRunProfileTransportGatewayImpl.java b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/gateway/user/UserRunProfileTransportGatewayImpl.java index 33386b75..d6eda6dd 100644 --- a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/gateway/user/UserRunProfileTransportGatewayImpl.java +++ b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/gateway/user/UserRunProfileTransportGatewayImpl.java @@ -1,5 +1,6 @@ package com.red.circle.other.infra.gateway.user; +import com.alibaba.fastjson.JSON; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.red.circle.framework.dto.ResultResponse; @@ -44,6 +45,7 @@ import com.red.circle.other.inner.model.dto.material.RoomThemeUserCustomizeDTO; import com.red.circle.other.inner.model.dto.material.UseBadgeDTO; import com.red.circle.other.inner.model.dto.material.UsePropsDTO; import com.red.circle.other.inner.model.dto.material.props.PropsNobleVipAbilityDTO; +import com.red.circle.other.inner.model.dto.user.PhotoItem; import com.red.circle.other.inner.model.dto.user.UserOneTimeTaskDTO; import com.red.circle.tool.core.collection.CollectionUtils; import com.red.circle.tool.core.date.DateUtils; @@ -97,6 +99,7 @@ public class UserRunProfileTransportGatewayImpl implements UserRunProfileTranspo @Override public UserProfile getByUserId(Long userId) { UserRunProfile userRunProfile = userRunProfileService.getById(userId); + userRunProfile = null; if (Objects.nonNull(userRunProfile)) { // 拥有靓号 UserSpecialId userSpecialId = userSpecialIdService.getByUserId(userId); @@ -267,20 +270,22 @@ public class UserRunProfileTransportGatewayImpl implements UserRunProfileTranspo return userBaseInfos.stream().map(userBaseInfo -> { UserRunProfile newUserRunProfile = userProfileInfraConvertor.toUserRunProfile(userBaseInfo); - List useBadgeDTOS = userUseBadgeEntities.get(userBaseInfo.getId()); - if (!CollectionUtils.isEmpty(useBadgeDTOS)) { - newUserRunProfile.addWearBadge(useBadgeDTOS.stream() - .filter(e -> !BadgeConfigTypeEnum.isHonorType(e.getType())).toList()); - newUserRunProfile.addWearHonor(useBadgeDTOS.stream() - .filter(e -> BadgeConfigTypeEnum.isHonorType(e.getType())).toList()); - } + List useBadgeDTOS = userUseBadgeEntities.get(userBaseInfo.getId()); + if (!CollectionUtils.isEmpty(useBadgeDTOS)) { + newUserRunProfile.addWearBadge(useBadgeDTOS.stream() + .filter(e -> !BadgeConfigTypeEnum.isHonorType(e.getType())).toList()); + newUserRunProfile.addWearHonor(useBadgeDTOS.stream() + .filter(e -> BadgeConfigTypeEnum.isHonorType(e.getType())).toList()); + } - // 用户是否首充处理 - fillUserFirstRecharge(newUserRunProfile); + // 用户是否首充处理 + fillUserFirstRecharge(newUserRunProfile); - newUserRunProfile.addUseProps(userUsePropsEntityMap.get(userBaseInfo.getId())); + newUserRunProfile.addUseProps(userUsePropsEntityMap.get(userBaseInfo.getId())); newUserRunProfile.addUseProps(userUseRoomTheme.get(userBaseInfo.getId())); newUserRunProfile.setOwnSpecialId(userSpecialIdMap.get(userBaseInfo.getId())); + newUserRunProfile.setBackgroundPhotos(JSON.parseArray(userBaseInfo.getBackgroundPhoto(), PhotoItem.class)); + newUserRunProfile.setPersonalPhotos(JSON.parseArray(userBaseInfo.getPersonalPhoto(), PhotoItem.class)); return newUserRunProfile; } ).collect(Collectors.toList());