userprofile 新增是否cp关系字段
This commit is contained in:
parent
51c5cf0712
commit
5ce5a784f0
@ -117,6 +117,11 @@ public class UserProfileDTO implements Serializable {
|
||||
*/
|
||||
private List<CpSimpleUserProfileCO> cpList;
|
||||
|
||||
/**
|
||||
* 是否cp关系
|
||||
*/
|
||||
private Boolean isCpRelation;
|
||||
|
||||
/**
|
||||
* 背景照片列表(最多9张)
|
||||
*/
|
||||
|
||||
@ -90,6 +90,9 @@ public class UserProfileUseQryExe {
|
||||
String isUpdateCountry = redisService.getString("IS_UPDATE_COUNTRY:" + cmd.requiredReqUserId());
|
||||
userProfileDTO.setIsUpdateCountry(StringUtils.isNotBlank(isUpdateCountry) ? isUpdateCountry : "0");
|
||||
|
||||
// 填充用户CP信息
|
||||
userProfileDTO.setCpList(cpRelationshipCacheService.getUserCpList(userProfile.getId()));
|
||||
|
||||
// 增加访客记录
|
||||
if (!Objects.equals(userProfile.getId(), cmd.requiredReqUserId())) {
|
||||
AppUserIdCmd userIdCmd = new AppUserIdCmd();
|
||||
@ -97,12 +100,11 @@ public class UserProfileUseQryExe {
|
||||
userIdCmd.setReqUserId(cmd.requiredReqUserId());
|
||||
userIdCmd.setReqSysOrigin(cmd.getReqSysOrigin());
|
||||
userRelationInterviewService.addVisitor(userIdCmd);
|
||||
|
||||
boolean match = userProfileDTO.getCpList().stream().anyMatch(e ->
|
||||
e.getMeUserId().equals(cmd.requiredReqUserId()) && e.getCpUserId().equals(userProfile.getId()));
|
||||
userProfileDTO.setIsCpRelation(match);
|
||||
}
|
||||
|
||||
|
||||
// 填充用户CP信息
|
||||
userProfileDTO.setCpList(cpRelationshipCacheService.getUserCpList(userProfile.getId()));
|
||||
|
||||
return userProfileDTO;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user