diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/family/ReapplyFamilyExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/family/ReapplyFamilyExe.java index eda53ce8..4796f809 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/family/ReapplyFamilyExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/family/ReapplyFamilyExe.java @@ -1,9 +1,11 @@ package com.red.circle.other.app.command.family; +import com.red.circle.component.redis.service.RedisService; import com.red.circle.framework.core.asserts.ResponseAssert; import com.red.circle.framework.core.response.CommonErrorCode; import com.red.circle.other.app.dto.cmd.family.ReapplyFamilyCmd; import com.red.circle.other.infra.common.family.FamilyCommon; +import com.red.circle.other.infra.database.cache.key.FamilyKeys; import com.red.circle.other.infra.database.rds.entity.family.FamilyMessage; import com.red.circle.other.infra.database.rds.service.family.FamilyMemberInfoService; import com.red.circle.other.infra.database.rds.service.family.FamilyMessageService; @@ -24,9 +26,13 @@ public class ReapplyFamilyExe { private final FamilyCommon familyCommon; private final FamilyMessageService familyMessageService; private final FamilyMemberInfoService familyMemberInfoService; + private final RedisService redisService; public void execute(ReapplyFamilyCmd cmd) { + String string = redisService.getString(FamilyKeys.USER_LEAVE.getKey()); + ResponseAssert.isNull(FamilyErrorCode.USER_RECENT_LEAVE, string); + FamilyMessage msg = familyMessageService.getById(cmd.getMsgId()); ResponseAssert.notNull(CommonErrorCode.NOT_FOUND_RECORD_INFO, msg); ResponseAssert.isTrue(CommonErrorCode.DATA_ERROR,