familyId 优化
This commit is contained in:
parent
4d69b94417
commit
b5c026a411
@ -105,9 +105,6 @@ public class UserProfileUseQryExe {
|
|||||||
e.getMeUserId().equals(userProfile.getId()) && e.getCpUserId().equals(cmd.requiredReqUserId()));
|
e.getMeUserId().equals(userProfile.getId()) && e.getCpUserId().equals(cmd.requiredReqUserId()));
|
||||||
userProfileDTO.setIsCpRelation(match);
|
userProfileDTO.setIsCpRelation(match);
|
||||||
}
|
}
|
||||||
|
|
||||||
userProfileDTO.setFamilyId(Optional.ofNullable(familyMemberInfoService.getFamilyMemberByUserId(userProfileDTO.getId())).map(FamilyMemberInfo::getFamilyId).orElse(null));
|
|
||||||
|
|
||||||
return userProfileDTO;
|
return userProfileDTO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -157,6 +157,12 @@ public class UserProfile implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private List<CpSimpleUserProfileCO> cpList;
|
private List<CpSimpleUserProfileCO> cpList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 家族ID
|
||||||
|
*/
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long familyId;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 拥有的靓号.
|
* 拥有的靓号.
|
||||||
|
|||||||
@ -193,6 +193,12 @@ public class UserRunProfile implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private List<CpSimpleUserProfileCO> cpList;
|
private List<CpSimpleUserProfileCO> cpList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 家族ID
|
||||||
|
*/
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long familyId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加使用道具.
|
* 添加使用道具.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -260,6 +260,9 @@ public class UserRunProfileServiceImpl implements UserRunProfileService {
|
|||||||
if (Objects.nonNull(userRunProfile.getFirstRechargeEndTime())) {
|
if (Objects.nonNull(userRunProfile.getFirstRechargeEndTime())) {
|
||||||
update.set("firstRechargeEndTime", userRunProfile.getFirstRechargeEndTime());
|
update.set("firstRechargeEndTime", userRunProfile.getFirstRechargeEndTime());
|
||||||
}
|
}
|
||||||
|
if (Objects.nonNull(userRunProfile.getFamilyId())) {
|
||||||
|
update.set("familyId", userRunProfile.getFamilyId());
|
||||||
|
}
|
||||||
|
|
||||||
return update;
|
return update;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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.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.UserRunProfileService;
|
||||||
import com.red.circle.other.infra.database.mongo.service.user.profile.UserSpecialIdService;
|
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.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.BaseInfo;
|
||||||
import com.red.circle.other.infra.database.rds.entity.user.user.OneTimeTask;
|
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.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.BadgeConfigService;
|
||||||
import com.red.circle.other.infra.database.rds.service.badge.BadgePictureConfigService;
|
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.PropsBackpackService;
|
||||||
import com.red.circle.other.infra.database.rds.service.props.PropsSourceRecordService;
|
import com.red.circle.other.infra.database.rds.service.props.PropsSourceRecordService;
|
||||||
import com.red.circle.other.infra.database.rds.service.props.RoomThemeUserBackpackService;
|
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 PropsResourcesInfraConvertor propsResourcesInfraConvertor;
|
||||||
private final RoomThemeUserCustomizeService roomThemeUserCustomizeService;
|
private final RoomThemeUserCustomizeService roomThemeUserCustomizeService;
|
||||||
private final OneTimeTaskService oneTimeTaskService;
|
private final OneTimeTaskService oneTimeTaskService;
|
||||||
private final CpRelationshipService cpRelationshipService;
|
private final FamilyMemberInfoService familyMemberInfoService;
|
||||||
private final CpValueService cpValueService;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public UserProfile getByUserId(Long userId) {
|
public UserProfile getByUserId(Long userId) {
|
||||||
@ -288,6 +289,7 @@ public class UserRunProfileTransportGatewayImpl implements UserRunProfileTranspo
|
|||||||
newUserRunProfile.setOwnSpecialId(userSpecialIdMap.get(userBaseInfo.getId()));
|
newUserRunProfile.setOwnSpecialId(userSpecialIdMap.get(userBaseInfo.getId()));
|
||||||
newUserRunProfile.setBackgroundPhotos(JSON.parseArray(userBaseInfo.getBackgroundPhoto(), PhotoItem.class));
|
newUserRunProfile.setBackgroundPhotos(JSON.parseArray(userBaseInfo.getBackgroundPhoto(), PhotoItem.class));
|
||||||
newUserRunProfile.setPersonalPhotos(JSON.parseArray(userBaseInfo.getPersonalPhoto(), 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;
|
return newUserRunProfile;
|
||||||
}
|
}
|
||||||
).collect(Collectors.toList());
|
).collect(Collectors.toList());
|
||||||
|
|||||||
@ -383,7 +383,6 @@ public class UserAccountClientServiceImpl implements UserAccountClientService {
|
|||||||
public UserAccountDTO createUserAccountDTO(Long userId, String imei, VoidConsumer voidConsumer) {
|
public UserAccountDTO createUserAccountDTO(Long userId, String imei, VoidConsumer voidConsumer) {
|
||||||
UserProfile userProfile = userProfileGateway.getByUserId(userId);
|
UserProfile userProfile = userProfileGateway.getByUserId(userId);
|
||||||
ResponseAssert.notNull(CommonErrorCode.DATA_ERROR, userProfile);
|
ResponseAssert.notNull(CommonErrorCode.DATA_ERROR, userProfile);
|
||||||
List<String> imeiList = List.of("7DD73EF2FC33128DEB6D68ED1E931379C2C613B5","2674AA85CF8EF827660DDABBFC231D615AD6E529","FE94F2B2CEEDEEADA31C790991B05CC06238EB68");
|
|
||||||
|
|
||||||
// 注册黑名单
|
// 注册黑名单
|
||||||
if (Objects.equals(userProfile.getDel(), Boolean.TRUE)) {
|
if (Objects.equals(userProfile.getDel(), Boolean.TRUE)) {
|
||||||
@ -405,11 +404,6 @@ public class UserAccountClientServiceImpl implements UserAccountClientService {
|
|||||||
"Device required.",
|
"Device required.",
|
||||||
StringUtils.isNotBlank(imei));
|
StringUtils.isNotBlank(imei));
|
||||||
|
|
||||||
//运营临时封禁设备
|
|
||||||
ResponseAssert.isTrue(CommonErrorCode.DEVICE_UNAVAILABLE,
|
|
||||||
"Device required.",
|
|
||||||
!imeiList.contains(imei));
|
|
||||||
|
|
||||||
ResponseAssert.isFalse(CommonErrorCode.DEVICE_UNAVAILABLE,
|
ResponseAssert.isFalse(CommonErrorCode.DEVICE_UNAVAILABLE,
|
||||||
getTipsUserAccount(CommonErrorCode.DEVICE_UNAVAILABLE, userProfile),
|
getTipsUserAccount(CommonErrorCode.DEVICE_UNAVAILABLE, userProfile),
|
||||||
archiveDeviceService.existsDevice(imei, userProfile.getOriginSys()));
|
archiveDeviceService.existsDevice(imei, userProfile.getOriginSys()));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user