lrf 2 年之前
父节点
当前提交
098d5a32ed
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      app/service/trade/coupon.js

+ 1 - 0
app/service/trade/coupon.js

@@ -26,6 +26,7 @@ class CouponService extends CrudService {
         const max = _.get(get_limit_config, 'max', 1);
         const num = await this.userCouponModel.count({ coupon: coupon._id, customer });
         if (this.ctx.minus(num, max) >= 0) coupon.canGet = false;
+        else coupon.canGet = true;
       }
     }
     return list;