From 72b494934755f674f0e3c10ece59b13ae9736ad6 Mon Sep 17 00:00:00 2001 From: zhl Date: Mon, 7 Jun 2021 20:27:48 +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 | 2 +- src/models/shop/ShopCfg.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/controllers/lottery.controller.ts b/src/api/controllers/lottery.controller.ts index 0201ac2..f1cc953 100644 --- a/src/api/controllers/lottery.controller.ts +++ b/src/api/controllers/lottery.controller.ts @@ -35,7 +35,7 @@ class LotteryController extends BaseController { let name = '抽奖券' let couponUrl = reward.icon if (reward.rewardType === 0) { - if (!couponMap.has(reward.coupon)) { + if (!couponMap.has(reward.coupon) && reward.coupon !== EMPTY) { let coupon = await Coupon.findById(reward.coupon) couponMap.set(coupon.id, coupon) } diff --git a/src/models/shop/ShopCfg.ts b/src/models/shop/ShopCfg.ts index 632b859..a6f89f8 100644 --- a/src/models/shop/ShopCfg.ts +++ b/src/models/shop/ShopCfg.ts @@ -51,7 +51,7 @@ export class LotteryCfgClass extends Base { /** * 奖励类型 - * @type {number} 0: 优惠券, 1: 抽奖券 + * @type {number} 0: 优惠券, 1: 抽奖券, 9: 留空 */ @prop({ default: 0 }) public rewardType: number