Skip to content

Commit

Permalink
Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop
Browse files Browse the repository at this point in the history
修正优惠券提示语
  • Loading branch information
chopper711 committed Jul 20, 2021
2 parents 8f351fd + f35ae5b commit 3734833
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion framework/src/main/java/cn/lili/common/enums/ResultCode.java
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,12 @@ public enum ResultCode {
/**
* 优惠券
*/
COUPON_LIMIT_ERROR(41000, "超出领取限制"),
COUPON_EDIT_STATUS_SUCCESS(41001, "修改状态成功!"),
COUPON_CANCELLATION_SUCCESS(41002, "会员优惠券作废成功"),
COUPON_EXPIRED(41003, "优惠券已使用/已过期,不能使用"),
COUPON_EDIT_STATUS_ERROR(41004, "优惠券修改状态失败!"),
COUPON_RECEIVE_ERROR(41005, "当前优惠券状态不可领取"),
COUPON_RECEIVE_ERROR(41005, "当前优惠券已经被领取完了,下次要早点来哦"),
COUPON_NUM_INSUFFICIENT_ERROR(41006, "优惠券剩余领取数量不足"),
COUPON_NOT_EXIST(41007, "当前优惠券不存在"),
COUPON_LIMIT_NUM_LESS_THAN_0(41008, "领取限制数量不能为负数"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ public void checkCouponLimit(String couponId, String memberId) {
if (coupon.getPublishNum() != 0 && coupon.getReceivedNum() >= coupon.getPublishNum()) {
throw new ServiceException(ResultCode.COUPON_NUM_INSUFFICIENT_ERROR);
}
if (haveCoupons >= coupon.getCouponLimitNum()) {
throw new ServiceException("此优惠券最多领取" + coupon.getCouponLimitNum() + "张");
if (!coupon.getCouponLimitNum().equals(0) && haveCoupons >= coupon.getCouponLimitNum()) {
throw new ServiceException(ResultCode.COUPON_LIMIT_ERROR, "此优惠券最多领取" + coupon.getCouponLimitNum() + "张");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -484,8 +484,8 @@ private void distributeStoreFullDiscountPromotionPrice(StorePromotionPriceDTO st
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);

Expand Down

0 comments on commit 3734833

Please sign in to comment.