lrf hace 2 años
padre
commit
098d5a32ed
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  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 max = _.get(get_limit_config, 'max', 1);
         const num = await this.userCouponModel.count({ coupon: coupon._id, customer });
         const num = await this.userCouponModel.count({ coupon: coupon._id, customer });
         if (this.ctx.minus(num, max) >= 0) coupon.canGet = false;
         if (this.ctx.minus(num, max) >= 0) coupon.canGet = false;
+        else coupon.canGet = true;
       }
       }
     }
     }
     return list;
     return list;