!228 优惠券折扣条件判断不可能同时成立

Merge pull request !228 from Fxz/N/A
This commit is contained in:
OceansDeep 2022-08-30 09:18:23 +00:00 committed by Gitee
commit c6c0801d14
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -190,7 +190,7 @@ public class CouponServiceImpl extends AbstractPromotionsServiceImpl<CouponMappe
}
//打折优惠券大于10折
boolean discountCoupon = (promotions.getCouponType().equals(CouponTypeEnum.DISCOUNT.name())
&& (promotions.getCouponDiscount() < 0 && promotions.getCouponDiscount() > 10));
&& (promotions.getCouponDiscount() < 0 || promotions.getCouponDiscount() > 10));
if (discountCoupon) {
throw new ServiceException(ResultCode.COUPON_DISCOUNT_ERROR);
}