用户接口新增财富魅力等级字段

This commit is contained in:
tianfeng 2025-09-17 18:30:01 +08:00
parent b0cc0d189f
commit dd69016cda
2 changed files with 18 additions and 0 deletions

View File

@ -124,6 +124,16 @@ public class UserProfileDTO implements Serializable {
*/
private String regionCode;
/**
* 财富等级.
*/
private Integer wealthLevel;
/**
* 魅力等级.
*/
private Integer charmLevel;
/**
* 系统来源.
*/

View File

@ -5,6 +5,7 @@ import com.red.circle.component.redis.service.RedisService;
import com.red.circle.framework.core.asserts.ResponseAssert;
import com.red.circle.framework.core.response.CommonErrorCode;
import com.red.circle.other.app.convertor.user.UserProfileAppConvertor;
import com.red.circle.other.app.dto.clientobject.user.user.UserLevelCO;
import com.red.circle.other.app.dto.cmd.user.user.UserProfileQryCmd;
import com.red.circle.other.app.service.room.RoomProfileService;
import com.red.circle.other.domain.gateway.user.UserProfileGateway;
@ -54,6 +55,13 @@ public class UserProfileUseQryExe {
boolean eqRegion = userRegionGateway.checkEqRegion(userProfile.getId(), cmd.requiredReqUserId());
userProfileDTO.setSameRegion(eqRegion);
userProfileDTO.setRegionCode(userRegionGateway.getRegionCode(userProfile.getId()));
UserLevelCO userLevelCO = userProfileAppConvertor.toUserLevelCO(userProfileGateway.getUserConsumptionLevel(
cmd.requireReqSysOriginEnum(), cmd.getUserId()));
if (userLevelCO != null) {
userProfileDTO.setWealthLevel(userLevelCO.getWealthLevel());
userProfileDTO.setCharmLevel(userLevelCO.getCharmLevel());
}
//放入redis key IN_ROOM:userId v 是roomId 放1分钟30秒每次来了都刷新过期时间
String inRoomId = redisService.getString("IN_ROOM:" + cmd.requiredReqUserId());
if (StringUtils.isNotBlank(inRoomId) && eqRegion) {