房间成员新增 财富魅力等级
This commit is contained in:
parent
e0be58ec2c
commit
b288fe86a9
@ -1,10 +1,12 @@
|
|||||||
package com.red.circle.other.app.command.room.query;
|
package com.red.circle.other.app.command.room.query;
|
||||||
|
|
||||||
import com.google.common.collect.Lists;
|
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.convertor.user.UserProfileAppConvertor;
|
||||||
import com.red.circle.other.app.dto.clientobject.room.RoomMemberUserCO;
|
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.app.dto.cmd.room.RoomMemberQryCmd;
|
||||||
import com.red.circle.other.domain.gateway.user.UserProfileGateway;
|
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.entity.live.RoomMember;
|
||||||
import com.red.circle.other.infra.database.rds.service.live.RoomMemberService;
|
import com.red.circle.other.infra.database.rds.service.live.RoomMemberService;
|
||||||
import com.red.circle.other.inner.model.dto.user.UserProfileDTO;
|
import com.red.circle.other.inner.model.dto.user.UserProfileDTO;
|
||||||
@ -80,10 +82,18 @@ public class RoomSearchMemberQryExe {
|
|||||||
return Lists.newArrayList();
|
return Lists.newArrayList();
|
||||||
}
|
}
|
||||||
|
|
||||||
return roomMembers.stream().map(roomMember -> new RoomMemberUserCO()
|
return roomMembers.stream().map(roomMember -> {
|
||||||
.setId(roomMember.getId())
|
UserProfileDTO userProfileDTO = userProfileMap.get(roomMember.getUserId());
|
||||||
.setRoles(roomMember.getRoles())
|
if (Objects.nonNull(userProfileDTO)) {
|
||||||
.setUserProfile(userProfileMap.get(roomMember.getUserId()))).toList();
|
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<RoomMember> getHomeownerAndManager(Long roomId) {
|
private List<RoomMember> getHomeownerAndManager(Long roomId) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user