From f6948319af3a71a3cff528ce59210985d106fd82 Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Fri, 13 Feb 2026 19:21:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=AD=94=E6=B3=95=E7=A4=BC?= =?UTF-8?q?=E7=89=A9=E5=8F=AA=E6=94=AF=E6=8C=81=E8=B5=A0=E9=80=81=E4=B8=80?= =?UTF-8?q?=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/red/circle/other/inner/asserts/GiftErrorCode.java | 5 +++++ .../circle/other/app/command/gift/LuckyGiftGiveCmdExe.java | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/rc-service/rc-inner-api/other-inner/other-inner-model/src/main/java/com/red/circle/other/inner/asserts/GiftErrorCode.java b/rc-service/rc-inner-api/other-inner/other-inner-model/src/main/java/com/red/circle/other/inner/asserts/GiftErrorCode.java index 7971ca62..e3f7860c 100644 --- a/rc-service/rc-inner-api/other-inner/other-inner-model/src/main/java/com/red/circle/other/inner/asserts/GiftErrorCode.java +++ b/rc-service/rc-inner-api/other-inner/other-inner-model/src/main/java/com/red/circle/other/inner/asserts/GiftErrorCode.java @@ -44,6 +44,11 @@ public enum GiftErrorCode implements IResponseErrorCode { * 不是同一个大区 */ NOT_SAME_REGION(8406, "Not the same region"), + + /** + * 魔法礼物只支持发送一个 + */ + MAGIC_GIFT_QUANTITY_ERROR(8407, "The function for gifting multiple magical gifts is currently experiencing issues and is temporarily unavailable.") ; private final int code; diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/gift/LuckyGiftGiveCmdExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/gift/LuckyGiftGiveCmdExe.java index 0ab9de07..3eca5705 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/gift/LuckyGiftGiveCmdExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/gift/LuckyGiftGiveCmdExe.java @@ -13,6 +13,7 @@ import com.red.circle.other.app.service.task.TaskService; import com.red.circle.other.domain.gateway.user.UserProfileGateway; import com.red.circle.other.infra.database.cache.service.other.GiftCacheService; import com.red.circle.other.inner.asserts.GiftErrorCode; +import com.red.circle.other.inner.asserts.OtherErrorCode; import com.red.circle.other.inner.asserts.RoomErrorCode; import com.red.circle.other.inner.enums.material.GiftCurrencyType; import com.red.circle.other.inner.enums.material.GiftTabEnum; @@ -70,6 +71,11 @@ public class LuckyGiftGiveCmdExe { log.info("赠送幸运礼物金额为0,余额为 {}", dollarAmount); return dollarAmount; } + + if (GiftTabEnum.MAGIC.name().equals(giftConfig.getGiftTab())) { + ResponseAssert.isFalse(GiftErrorCode.MAGIC_GIFT_QUANTITY_ERROR, cmd.getQuantity() > 1); + } + // 付钱 WalletReceiptResDTO receipt = consumeCandy(cmd, giftConfig);