|
@@ -294,7 +294,7 @@ class UserCouponService extends CrudService {
|
|
|
// 有最低消费的限制,就需要看看下满足条件的商品够不够这个金额
|
|
|
// 消费下限 大于 满足优惠券使用的商品的消费总额,则不能使用这个券,消费的钱不够
|
|
|
// 且这个地方应该报错
|
|
|
- if (this.ctx.minus(limit, goodsTotal) <= 0) throw new BusinessError(ErrorCode.DATA_INVALID, `消费券:${coupon.name}不满足使用条件`);
|
|
|
+ if (this.ctx.minus(limit, goodsTotal) > 0) throw new BusinessError(ErrorCode.DATA_INVALID, `消费券:${coupon.name}不满足使用条件`);
|
|
|
}
|
|
|
// 减免设置转换成 实际减免总金额:
|
|
|
// 满减则直接就是 min(设置的满x减y的y);
|