优惠券折扣条件判断不可能同时成立
Signed-off-by: Fxz <2235602974@qq.com>
This commit is contained in:
parent
8387e03254
commit
daed961a99
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user