diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/UpdateUserProfileCmdExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/UpdateUserProfileCmdExe.java index 85939d6b..337faca1 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/UpdateUserProfileCmdExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/UpdateUserProfileCmdExe.java @@ -15,6 +15,7 @@ import com.red.circle.other.domain.gateway.approval.ProfileApprovalGateway; import com.red.circle.other.domain.gateway.user.UserProfileGateway; import com.red.circle.other.domain.model.approval.ProfileApprovalContent; import com.red.circle.other.domain.model.user.UserProfile; +import com.red.circle.other.infra.database.cache.service.cp.CpRelationshipCacheService; import com.red.circle.other.infra.database.mongo.service.live.RoomProfileManagerService; import com.red.circle.other.infra.database.rds.entity.sys.SysCountryCode; import com.red.circle.other.infra.database.rds.entity.user.user.BaseInfo; @@ -28,6 +29,8 @@ import com.red.circle.other.inner.model.dto.user.PhotoItem; import com.red.circle.other.inner.asserts.user.UserErrorCode; import com.red.circle.other.inner.model.dto.user.UserProfileDTO; +import java.util.Arrays; +import java.util.Collections; import java.util.List; import java.util.Objects; import java.util.concurrent.TimeUnit; @@ -55,6 +58,7 @@ public class UpdateUserProfileCmdExe { private final ProfileApprovalGateway profileApprovalGateway; private final UserProfileAppConvertor userProfileAppConvertor; private final RoomProfileManagerService roomProfileManagerService; + private final CpRelationshipCacheService cpRelationshipCacheService; public UserProfileDTO execute(UserProfileModifyCmd cmd) { //敏感词 @@ -137,6 +141,9 @@ public class UpdateUserProfileCmdExe { // 更改国家 设置redis表示已修改 两年过期 redisService.setString("IS_UPDATE_COUNTRY:" + cmd.requiredReqUserId(), "1", 730, TimeUnit.DAYS); } + + cpRelationshipCacheService.remove(Collections.singletonList(cmd.requiredReqUserId())); + return userProfileAppConvertor.toUserProfileDTO(userProfile); }