From 420e9b1b397521caf4f51833f6f890779388cf44 Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Thu, 30 Oct 2025 12:24:38 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BF=E5=AE=A2=EF=BC=8C=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E8=B5=84=E6=96=99=E5=88=97=E8=A1=A8=E6=96=B0=E5=A2=9E=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E8=AE=BF=E5=AE=A2=E8=AE=A1=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../command/user/query/UserProfileUseQryExe.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 be73cbdb..1c88e72d 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 @@ -1,6 +1,7 @@ package com.red.circle.other.app.command.user.query; import com.red.circle.common.business.core.AppBusinessUtils; +import com.red.circle.common.business.dto.cmd.app.AppUserIdCmd; import com.red.circle.component.redis.service.RedisService; import com.red.circle.framework.core.asserts.ResponseAssert; import com.red.circle.framework.core.response.CommonErrorCode; @@ -8,6 +9,7 @@ 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.app.service.user.relation.UserSupportRelationService; import com.red.circle.other.domain.gateway.user.UserProfileGateway; import com.red.circle.other.domain.gateway.user.ability.UserRegionGateway; import com.red.circle.other.domain.model.user.UserProfile; @@ -39,6 +41,7 @@ public class UserProfileUseQryExe { private final UserProfileAppConvertor userProfileAppConvertor; private final RoomProfileManagerService roomProfileManagerService; private final RedisService redisService; + private final UserSupportRelationService userRelationInterviewService; public UserProfileDTO execute(UserProfileQryCmd cmd) { UserProfile userProfile = getUserProfile(cmd); @@ -74,6 +77,16 @@ public class UserProfileUseQryExe { } String isUpdateCountry = redisService.getString("IS_UPDATE_COUNTRY:" + cmd.requiredReqUserId()); userProfileDTO.setIsUpdateCountry(StringUtils.isNotBlank(isUpdateCountry) ? isUpdateCountry : "0"); + + // 增加访客记录 + if (!Objects.equals(userProfile.getId(), cmd.requiredReqUserId())) { + AppUserIdCmd userIdCmd = new AppUserIdCmd(); + userIdCmd.setUserId(cmd.getUserId()); + userIdCmd.setReqUserId(cmd.requiredReqUserId()); + userIdCmd.setReqSysOrigin(cmd.getReqSysOrigin()); + userRelationInterviewService.addVisitor(userIdCmd); + } + return userProfileDTO; }