From cbc975eef9ea6d3f47ad5f4699d13f18ef6db3a8 Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Wed, 14 Jan 2026 15:12:37 +0800 Subject: [PATCH] =?UTF-8?q?=E9=AA=8C=E8=AF=81=E6=98=AF=E5=90=A6=E6=98=AF?= =?UTF-8?q?=E5=A5=BD=E5=8F=8B=20=E6=A0=A1=E9=AA=8C=E5=BC=80=E6=94=BE?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AE=A2=E6=9C=8D=E4=BA=BA=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/command/user/query/FriendCheckQryExe.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/query/FriendCheckQryExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/query/FriendCheckQryExe.java index 5e1ef799..02ce59c7 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/query/FriendCheckQryExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/query/FriendCheckQryExe.java @@ -1,8 +1,12 @@ package com.red.circle.other.app.command.user.query; import com.red.circle.common.business.dto.cmd.app.AppUserIdCmd; +import com.red.circle.other.infra.database.mongo.entity.sys.CustomerServiceConfig; +import com.red.circle.other.infra.database.mongo.service.sys.CustomerServiceConfigService; import com.red.circle.other.infra.database.rds.service.sys.AdministratorService; import com.red.circle.other.infra.database.rds.service.user.user.RelationshipFriendService; + +import java.util.List; import java.util.Objects; import java.util.Set; import lombok.RequiredArgsConstructor; @@ -19,6 +23,7 @@ public class FriendCheckQryExe { private final AdministratorService administratorService; private final RelationshipFriendService relationshipFriendService; + private final CustomerServiceConfigService customerServiceConfigService; public Boolean execute(AppUserIdCmd cmd) { Boolean isAdmin = administratorService.existsAvailable( @@ -28,6 +33,12 @@ public class FriendCheckQryExe { return Boolean.TRUE; } + List configList = customerServiceConfigService.list(cmd.getReqSysOrigin().getOrigin(), ""); + boolean match = configList.stream().anyMatch(c -> c.getUserId().equals(cmd.getUserId()) || c.getUserId().equals(cmd.getReqUserId())); + if (match) { + return Boolean.TRUE; + } + return relationshipFriendService .checkFriend(cmd.requiredReqUserId(), cmd.getUserId()); }