diff --git a/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/MemberCouponServiceImpl.java b/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/MemberCouponServiceImpl.java index 1dbb454a..8675c1bd 100644 --- a/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/MemberCouponServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/MemberCouponServiceImpl.java @@ -58,7 +58,7 @@ public class MemberCouponServiceImpl extends ServiceImpl= coupon.getPublishNum()) { throw new ServiceException(ResultCode.COUPON_NUM_INSUFFICIENT_ERROR); } - if (haveCoupons >= coupon.getCouponLimitNum()) { + if (!coupon.getCouponLimitNum().equals(0) && haveCoupons >= coupon.getCouponLimitNum()) { throw new ServiceException("此优惠券最多领取" + coupon.getCouponLimitNum() + "张"); } } diff --git a/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/PromotionPriceServiceImpl.java b/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/PromotionPriceServiceImpl.java index d3d06fa8..9a894168 100644 --- a/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/PromotionPriceServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/promotion/serviceimpl/PromotionPriceServiceImpl.java @@ -484,8 +484,8 @@ public class PromotionPriceServiceImpl implements PromotionPriceService { goodsSkuPromotionPrice.setTotalDiscountPrice(distributeDiscountTotalPrice); //单品成交价 double finalPrice = CurrencyUtil.sub(goodsSkuPromotionPrice.getTotalOriginalPrice(), distributeDiscountTotalPrice); - goodsSkuPromotionPrice.setFinalePrice(finalPrice); - goodsSkuPromotionPrice.setTotalFinalePrice(CurrencyUtil.mul(finalPrice, goodsSkuPromotionPrice.getNumber())); + goodsSkuPromotionPrice.setFinalePrice(CurrencyUtil.div(finalPrice, goodsSkuPromotionPrice.getNumber())); + goodsSkuPromotionPrice.setTotalFinalePrice(finalPrice); fullDiscount.setPromotionName(PromotionTypeEnum.FULL_DISCOUNT.name()); goodsSkuPromotionPrice.getJoinPromotion().add(fullDiscount);