From bb123ec23e4f51dc311b1e82bfe2f3777076d576 Mon Sep 17 00:00:00 2001 From: zhl Date: Mon, 7 Jun 2021 20:29:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AF=B9=E7=A9=BA=E7=99=BD?= =?UTF-8?q?=E5=A5=96=E5=8A=B1=E7=9A=84=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/controllers/lottery.controller.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/controllers/lottery.controller.ts b/src/api/controllers/lottery.controller.ts index f1cc953..42a6103 100644 --- a/src/api/controllers/lottery.controller.ts +++ b/src/api/controllers/lottery.controller.ts @@ -34,8 +34,8 @@ class LotteryController extends BaseController { for (let reward of cfg.lottery_cfgs) { let name = '抽奖券' let couponUrl = reward.icon - if (reward.rewardType === 0) { - if (!couponMap.has(reward.coupon) && reward.coupon !== EMPTY) { + if (reward.rewardType === 0 && reward.coupon !== EMPTY) { + if (!couponMap.has(reward.coupon)) { let coupon = await Coupon.findById(reward.coupon) couponMap.set(coupon.id, coupon) }