lrf 2 år sedan
förälder
incheckning
098d5a32ed
1 ändrade filer med 1 tillägg och 0 borttagningar
  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;