VIP权益-防拉黑
This commit is contained in:
parent
e882e29eb5
commit
d7dfa915af
@ -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.asserts.ResponseAssert;
|
||||||
import com.red.circle.framework.core.response.CommonErrorCode;
|
import com.red.circle.framework.core.response.CommonErrorCode;
|
||||||
import com.red.circle.other.app.dto.cmd.user.user.UserShieldBlackUserCmd;
|
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.gateway.user.ability.UserRelationsCalculatorGateway;
|
||||||
import com.red.circle.other.domain.model.user.ability.UserRelationsCalculator;
|
import com.red.circle.other.domain.model.user.ability.UserRelationsCalculator;
|
||||||
import com.red.circle.other.infra.database.cache.service.other.EnumConfigCacheService;
|
import com.red.circle.other.infra.database.cache.service.other.EnumConfigCacheService;
|
||||||
@ -46,8 +48,13 @@ public class UserShieldBlackAddCmdExe {
|
|||||||
private final UserSubscriptionService userSubscriptionService;
|
private final UserSubscriptionService userSubscriptionService;
|
||||||
private final UserRelationsCalculatorGateway userRelationsCalculatorGateway;
|
private final UserRelationsCalculatorGateway userRelationsCalculatorGateway;
|
||||||
private final UserRelationshipCacheService userRelationshipCacheService;
|
private final UserRelationshipCacheService userRelationshipCacheService;
|
||||||
|
private final UserProfileGateway userProfileGateway;
|
||||||
|
|
||||||
public void execute(UserShieldBlackUserCmd cmd) {
|
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,
|
String superAdminIds = enumConfigCacheService.getValue(EnumConfigKey.ASWAT_ADMINS,
|
||||||
cmd.requireReqSysOrigin());
|
cmd.requireReqSysOrigin());
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user