From 4d69b94417dd9e753c701ec5380b47d3e0e0f041 Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Mon, 29 Dec 2025 18:58:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A5=E9=94=99=E6=96=87=E6=A1=88=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/red/circle/other/inner/asserts/FamilyErrorCode.java | 5 +++++ .../other/app/command/family/CancelFamilyApplyExe.java | 3 +++ .../circle/other/app/command/family/ReapplyFamilyExe.java | 2 ++ 3 files changed, 10 insertions(+) diff --git a/rc-service/rc-inner-api/other-inner/other-inner-model/src/main/java/com/red/circle/other/inner/asserts/FamilyErrorCode.java b/rc-service/rc-inner-api/other-inner/other-inner-model/src/main/java/com/red/circle/other/inner/asserts/FamilyErrorCode.java index aabeefb7..f0a31add 100644 --- a/rc-service/rc-inner-api/other-inner/other-inner-model/src/main/java/com/red/circle/other/inner/asserts/FamilyErrorCode.java +++ b/rc-service/rc-inner-api/other-inner/other-inner-model/src/main/java/com/red/circle/other/inner/asserts/FamilyErrorCode.java @@ -98,6 +98,11 @@ public enum FamilyErrorCode implements IResponseErrorCode { */ ONLY_ADMIN_CAN_DISBAND_FAMILY(2517, "Only the patriarch can disband the family"), + /** + * 用户已加入家族 + */ + USER_JOINED_FAMILY(2518, "The user has joined the family"), + ; diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/family/CancelFamilyApplyExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/family/CancelFamilyApplyExe.java index c061e63a..d79e19df 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/family/CancelFamilyApplyExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/family/CancelFamilyApplyExe.java @@ -5,6 +5,7 @@ import com.red.circle.framework.core.response.CommonErrorCode; import com.red.circle.other.app.dto.cmd.family.CancelFamilyApplyCmd; import com.red.circle.other.infra.database.rds.entity.family.FamilyMessage; import com.red.circle.other.infra.database.rds.service.family.FamilyMessageService; +import com.red.circle.other.inner.asserts.FamilyErrorCode; import com.red.circle.other.inner.enums.FamilyMessageStatusEnum; import java.util.Objects; import lombok.RequiredArgsConstructor; @@ -25,6 +26,8 @@ public class CancelFamilyApplyExe { ResponseAssert.notNull(CommonErrorCode.NOT_FOUND_RECORD_INFO, msg); ResponseAssert.isTrue(CommonErrorCode.DATA_ERROR, Objects.equals(msg.getSenderUser(), cmd.getReqUserId())); + ResponseAssert.isFalse(FamilyErrorCode.USER_JOINED_FAMILY, + Objects.equals(msg.getStatus(), FamilyMessageStatusEnum.APPROVED.getCode())); ResponseAssert.isTrue(CommonErrorCode.DATA_ERROR, Objects.equals(msg.getStatus(), FamilyMessageStatusEnum.PENDING.getCode())); 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 cb21a455..ad1a3710 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 @@ -37,6 +37,8 @@ public class ReapplyFamilyExe { ResponseAssert.notNull(CommonErrorCode.NOT_FOUND_RECORD_INFO, msg); ResponseAssert.isTrue(CommonErrorCode.DATA_ERROR, Objects.equals(msg.getSenderUser(), cmd.getReqUserId())); + ResponseAssert.isFalse(FamilyErrorCode.USER_JOINED_FAMILY, + Objects.equals(msg.getStatus(), FamilyMessageStatusEnum.APPROVED.getCode())); ResponseAssert.isTrue(CommonErrorCode.DATA_ERROR, Objects.equals(msg.getStatus(), FamilyMessageStatusEnum.REJECTED.getCode()));