diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/room/query/RoomSearchMemberQryExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/room/query/RoomSearchMemberQryExe.java index 9d914701..c41818f6 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/room/query/RoomSearchMemberQryExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/room/query/RoomSearchMemberQryExe.java @@ -1,10 +1,12 @@ package com.red.circle.other.app.command.room.query; import com.google.common.collect.Lists; +import com.red.circle.common.business.core.enums.SysOriginPlatformEnum; import com.red.circle.other.app.convertor.user.UserProfileAppConvertor; import com.red.circle.other.app.dto.clientobject.room.RoomMemberUserCO; import com.red.circle.other.app.dto.cmd.room.RoomMemberQryCmd; import com.red.circle.other.domain.gateway.user.UserProfileGateway; +import com.red.circle.other.domain.model.user.UserConsumptionLevel; import com.red.circle.other.infra.database.rds.entity.live.RoomMember; import com.red.circle.other.infra.database.rds.service.live.RoomMemberService; import com.red.circle.other.inner.model.dto.user.UserProfileDTO; @@ -80,10 +82,18 @@ public class RoomSearchMemberQryExe { return Lists.newArrayList(); } - return roomMembers.stream().map(roomMember -> new RoomMemberUserCO() - .setId(roomMember.getId()) - .setRoles(roomMember.getRoles()) - .setUserProfile(userProfileMap.get(roomMember.getUserId()))).toList(); + return roomMembers.stream().map(roomMember -> { + UserProfileDTO userProfileDTO = userProfileMap.get(roomMember.getUserId()); + if (Objects.nonNull(userProfileDTO)) { + UserConsumptionLevel userConsumptionLevel = userProfileGateway.getUserConsumptionLevel(SysOriginPlatformEnum.ATYOU, userProfileDTO.getId()); + userProfileDTO.setWealthLevel(userConsumptionLevel.getWealthLevel()); + userProfileDTO.setCharmLevel(userConsumptionLevel.getCharmLevel()); + } + return new RoomMemberUserCO() + .setId(roomMember.getId()) + .setRoles(roomMember.getRoles()) + .setUserProfile(userProfileDTO); + }).toList(); } private List getHomeownerAndManager(Long roomId) {