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