userprofile 接口新增照片返回

This commit is contained in:
tianfeng 2025-12-10 16:30:44 +08:00
parent d3a05b1cf3
commit f2e5087b22

View File

@ -1,5 +1,6 @@
package com.red.circle.other.infra.gateway.user; package com.red.circle.other.infra.gateway.user;
import com.alibaba.fastjson.JSON;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.red.circle.framework.dto.ResultResponse; 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.UseBadgeDTO;
import com.red.circle.other.inner.model.dto.material.UsePropsDTO; 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.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.other.inner.model.dto.user.UserOneTimeTaskDTO;
import com.red.circle.tool.core.collection.CollectionUtils; import com.red.circle.tool.core.collection.CollectionUtils;
import com.red.circle.tool.core.date.DateUtils; import com.red.circle.tool.core.date.DateUtils;
@ -97,6 +99,7 @@ public class UserRunProfileTransportGatewayImpl implements UserRunProfileTranspo
@Override @Override
public UserProfile getByUserId(Long userId) { public UserProfile getByUserId(Long userId) {
UserRunProfile userRunProfile = userRunProfileService.getById(userId); UserRunProfile userRunProfile = userRunProfileService.getById(userId);
userRunProfile = null;
if (Objects.nonNull(userRunProfile)) { if (Objects.nonNull(userRunProfile)) {
// 拥有靓号 // 拥有靓号
UserSpecialId userSpecialId = userSpecialIdService.getByUserId(userId); UserSpecialId userSpecialId = userSpecialIdService.getByUserId(userId);
@ -281,6 +284,8 @@ public class UserRunProfileTransportGatewayImpl implements UserRunProfileTranspo
newUserRunProfile.addUseProps(userUsePropsEntityMap.get(userBaseInfo.getId())); newUserRunProfile.addUseProps(userUsePropsEntityMap.get(userBaseInfo.getId()));
newUserRunProfile.addUseProps(userUseRoomTheme.get(userBaseInfo.getId())); newUserRunProfile.addUseProps(userUseRoomTheme.get(userBaseInfo.getId()));
newUserRunProfile.setOwnSpecialId(userSpecialIdMap.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; return newUserRunProfile;
} }
).collect(Collectors.toList()); ).collect(Collectors.toList());