Merge branch 'master' of gitee.com:beijing_hongye_huicheng/lilishop
修正优惠券提示语
This commit is contained in:
commit
37348335b2
@ -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, "领取限制数量不能为负数"),
|
||||
|
@ -58,8 +58,8 @@ public class MemberCouponServiceImpl extends ServiceImpl<MemberCouponMapper, Mem
|
||||
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() + "张");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user