新增魔法礼物只支持赠送一个
This commit is contained in:
parent
065611a20f
commit
f6948319af
@ -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;
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user