diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/query/UserProfileUseQryExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/query/UserProfileUseQryExe.java index 3df2922c..88b307ab 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/query/UserProfileUseQryExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/query/UserProfileUseQryExe.java @@ -105,9 +105,6 @@ public class UserProfileUseQryExe { e.getMeUserId().equals(userProfile.getId()) && e.getCpUserId().equals(cmd.requiredReqUserId())); userProfileDTO.setIsCpRelation(match); } - - userProfileDTO.setFamilyId(Optional.ofNullable(familyMemberInfoService.getFamilyMemberByUserId(userProfileDTO.getId())).map(FamilyMemberInfo::getFamilyId).orElse(null)); - return userProfileDTO; } diff --git a/rc-service/rc-service-other/other-domain/src/main/java/com/red/circle/other/domain/model/user/UserProfile.java b/rc-service/rc-service-other/other-domain/src/main/java/com/red/circle/other/domain/model/user/UserProfile.java index 85c36d4f..72e152b1 100644 --- a/rc-service/rc-service-other/other-domain/src/main/java/com/red/circle/other/domain/model/user/UserProfile.java +++ b/rc-service/rc-service-other/other-domain/src/main/java/com/red/circle/other/domain/model/user/UserProfile.java @@ -157,6 +157,12 @@ public class UserProfile implements Serializable { */ private List cpList; + /** + * 家族ID + */ + @JsonSerialize(using = ToStringSerializer.class) + private Long familyId; + /** * 拥有的靓号. diff --git a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/mongo/entity/user/profile/UserRunProfile.java b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/mongo/entity/user/profile/UserRunProfile.java index 8cb40d95..ab3c4293 100644 --- a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/mongo/entity/user/profile/UserRunProfile.java +++ b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/mongo/entity/user/profile/UserRunProfile.java @@ -193,6 +193,12 @@ public class UserRunProfile implements Serializable { */ private List cpList; + /** + * 家族ID + */ + @JsonSerialize(using = ToStringSerializer.class) + private Long familyId; + /** * 添加使用道具. */ diff --git a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/mongo/service/user/profile/impl/UserRunProfileServiceImpl.java b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/mongo/service/user/profile/impl/UserRunProfileServiceImpl.java index 57797848..e11f0705 100644 --- a/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/mongo/service/user/profile/impl/UserRunProfileServiceImpl.java +++ b/rc-service/rc-service-other/other-infrastructure/src/main/java/com/red/circle/other/infra/database/mongo/service/user/profile/impl/UserRunProfileServiceImpl.java @@ -260,6 +260,9 @@ public class UserRunProfileServiceImpl implements UserRunProfileService { if (Objects.nonNull(userRunProfile.getFirstRechargeEndTime())) { update.set("firstRechargeEndTime", userRunProfile.getFirstRechargeEndTime()); } + if (Objects.nonNull(userRunProfile.getFamilyId())) { + update.set("familyId", userRunProfile.getFamilyId()); + } return update; } 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 7c6b5ae9..a2e2b770 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 @@ -17,12 +17,14 @@ import com.red.circle.other.infra.database.mongo.entity.user.profile.UserRunProf import com.red.circle.other.infra.database.mongo.entity.user.profile.UserSpecialId; import com.red.circle.other.infra.database.mongo.service.user.profile.UserRunProfileService; import com.red.circle.other.infra.database.mongo.service.user.profile.UserSpecialIdService; +import com.red.circle.other.infra.database.rds.entity.family.FamilyMemberInfo; import com.red.circle.other.infra.database.rds.entity.props.PropsBackpack; import com.red.circle.other.infra.database.rds.entity.user.user.BaseInfo; import com.red.circle.other.infra.database.rds.entity.user.user.OneTimeTask; import com.red.circle.other.infra.database.rds.entity.user.user.CpRelationship; import com.red.circle.other.infra.database.rds.service.badge.BadgeConfigService; import com.red.circle.other.infra.database.rds.service.badge.BadgePictureConfigService; +import com.red.circle.other.infra.database.rds.service.family.FamilyMemberInfoService; import com.red.circle.other.infra.database.rds.service.props.PropsBackpackService; import com.red.circle.other.infra.database.rds.service.props.PropsSourceRecordService; import com.red.circle.other.infra.database.rds.service.props.RoomThemeUserBackpackService; @@ -92,8 +94,7 @@ public class UserRunProfileTransportGatewayImpl implements UserRunProfileTranspo private final PropsResourcesInfraConvertor propsResourcesInfraConvertor; private final RoomThemeUserCustomizeService roomThemeUserCustomizeService; private final OneTimeTaskService oneTimeTaskService; - private final CpRelationshipService cpRelationshipService; - private final CpValueService cpValueService; + private final FamilyMemberInfoService familyMemberInfoService; @Override public UserProfile getByUserId(Long userId) { @@ -288,6 +289,7 @@ public class UserRunProfileTransportGatewayImpl implements UserRunProfileTranspo newUserRunProfile.setOwnSpecialId(userSpecialIdMap.get(userBaseInfo.getId())); newUserRunProfile.setBackgroundPhotos(JSON.parseArray(userBaseInfo.getBackgroundPhoto(), PhotoItem.class)); newUserRunProfile.setPersonalPhotos(JSON.parseArray(userBaseInfo.getPersonalPhoto(), PhotoItem.class)); + newUserRunProfile.setFamilyId(Optional.ofNullable(familyMemberInfoService.getFamilyMemberByUserId(userBaseInfo.getId())).map(FamilyMemberInfo::getFamilyId).orElse(null)); return newUserRunProfile; } ).collect(Collectors.toList()); diff --git a/rc-service/rc-service-other/other-inner-endpoint/src/main/java/com/red/circle/other/app/inner/service/user/user/impl/UserAccountClientServiceImpl.java b/rc-service/rc-service-other/other-inner-endpoint/src/main/java/com/red/circle/other/app/inner/service/user/user/impl/UserAccountClientServiceImpl.java index 0a056fca..d8cc48bd 100644 --- a/rc-service/rc-service-other/other-inner-endpoint/src/main/java/com/red/circle/other/app/inner/service/user/user/impl/UserAccountClientServiceImpl.java +++ b/rc-service/rc-service-other/other-inner-endpoint/src/main/java/com/red/circle/other/app/inner/service/user/user/impl/UserAccountClientServiceImpl.java @@ -383,7 +383,6 @@ public class UserAccountClientServiceImpl implements UserAccountClientService { public UserAccountDTO createUserAccountDTO(Long userId, String imei, VoidConsumer voidConsumer) { UserProfile userProfile = userProfileGateway.getByUserId(userId); ResponseAssert.notNull(CommonErrorCode.DATA_ERROR, userProfile); - List imeiList = List.of("7DD73EF2FC33128DEB6D68ED1E931379C2C613B5","2674AA85CF8EF827660DDABBFC231D615AD6E529","FE94F2B2CEEDEEADA31C790991B05CC06238EB68"); // 注册黑名单 if (Objects.equals(userProfile.getDel(), Boolean.TRUE)) { @@ -405,11 +404,6 @@ public class UserAccountClientServiceImpl implements UserAccountClientService { "Device required.", StringUtils.isNotBlank(imei)); - //运营临时封禁设备 - ResponseAssert.isTrue(CommonErrorCode.DEVICE_UNAVAILABLE, - "Device required.", - !imeiList.contains(imei)); - ResponseAssert.isFalse(CommonErrorCode.DEVICE_UNAVAILABLE, getTipsUserAccount(CommonErrorCode.DEVICE_UNAVAILABLE, userProfile), archiveDeviceService.existsDevice(imei, userProfile.getOriginSys()));