lrf 2 anni fa
parent
commit
098d5a32ed
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  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;