diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/family/DisbandFamilyCmdExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/family/DisbandFamilyCmdExe.java index 2b2cb1ca..7100a84c 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/family/DisbandFamilyCmdExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/family/DisbandFamilyCmdExe.java @@ -1,10 +1,12 @@ 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.other.app.dto.cmd.family.DisbandFamilyCmd; import com.red.circle.other.domain.gateway.user.UserProfileGateway; import com.red.circle.other.infra.common.family.FamilyCommon; import com.red.circle.other.infra.common.family.FamilyNewsRecorder; +import com.red.circle.other.infra.database.cache.key.FamilyKeys; import com.red.circle.other.infra.database.rds.entity.family.FamilyBaseInfo; import com.red.circle.other.infra.database.rds.entity.family.FamilyMemberInfo; import com.red.circle.other.infra.database.rds.service.family.FamilyBaseInfoService; @@ -21,6 +23,7 @@ import com.red.circle.tool.core.collection.CollectionUtils; import java.util.HashSet; import java.util.List; +import java.util.concurrent.TimeUnit; import java.util.stream.Collectors; import lombok.RequiredArgsConstructor; @@ -46,6 +49,7 @@ public class DisbandFamilyCmdExe { private final FamilyLevelExpService familyLevelExpService; private final FamilyMemberWeekExpService familyMemberWeekExpService; private final FamilyMemberTotalExpService familyMemberTotalExpService; + private final RedisService redisService; @Transactional(rollbackFor = Exception.class) public void execute(DisbandFamilyCmd cmd) { @@ -63,6 +67,8 @@ public class DisbandFamilyCmdExe { List allMembers = familyMemberInfoService.listByFamilyId(familyId); notifyAllMembers(allMembers, familyId); + + redisService.setString(FamilyKeys.USER_LEAVE.getKey(cmd.getReqUserId()), familyId, 1, TimeUnit.DAYS); } private void clearFamilyData(Long familyId) {