From d7dfa915af475eb2f3a67c4da406b69304594801 Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Mon, 16 Mar 2026 18:16:46 +0800 Subject: [PATCH] =?UTF-8?q?VIP=E6=9D=83=E7=9B=8A-=E9=98=B2=E6=8B=89?= =?UTF-8?q?=E9=BB=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../other/app/command/user/UserShieldBlackAddCmdExe.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/UserShieldBlackAddCmdExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/UserShieldBlackAddCmdExe.java index e83823d9..3404dfdd 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/UserShieldBlackAddCmdExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/user/UserShieldBlackAddCmdExe.java @@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.toolkit.IdWorker; import com.red.circle.framework.core.asserts.ResponseAssert; import com.red.circle.framework.core.response.CommonErrorCode; import com.red.circle.other.app.dto.cmd.user.user.UserShieldBlackUserCmd; +import com.red.circle.other.domain.enums.VipAbilityType; +import com.red.circle.other.domain.gateway.user.UserProfileGateway; import com.red.circle.other.domain.gateway.user.ability.UserRelationsCalculatorGateway; import com.red.circle.other.domain.model.user.ability.UserRelationsCalculator; import com.red.circle.other.infra.database.cache.service.other.EnumConfigCacheService; @@ -46,8 +48,13 @@ public class UserShieldBlackAddCmdExe { private final UserSubscriptionService userSubscriptionService; private final UserRelationsCalculatorGateway userRelationsCalculatorGateway; private final UserRelationshipCacheService userRelationshipCacheService; + private final UserProfileGateway userProfileGateway; public void execute(UserShieldBlackUserCmd cmd) { + boolean hasAbility = userProfileGateway.getUserVipAbility(cmd.getShieldUserId(), VipAbilityType.ANTI_BLOCK); + if (hasAbility) { + ResponseAssert.isFalse(CommonErrorCode.INSUFFICIENT_PERMISSION, hasAbility); + } String superAdminIds = enumConfigCacheService.getValue(EnumConfigKey.ASWAT_ADMINS, cmd.requireReqSysOrigin());