From 72cf5cdaef3be1e81da7f59d6ed61fe368f44816 Mon Sep 17 00:00:00 2001 From: cloudroam <cloudroam> Date: 星期三, 08 一月 2025 14:48:46 +0800 Subject: [PATCH] add:物流发货针对散户更改微信发货方式,保存物流单号,未发送之前可更改 --- src/main/java/com/mzl/flower/web/v2/coupon/CouponTemplateVipController.java | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/mzl/flower/web/v2/coupon/CouponTemplateVipController.java b/src/main/java/com/mzl/flower/web/v2/coupon/CouponTemplateVipController.java index fe543b1..1af24f4 100644 --- a/src/main/java/com/mzl/flower/web/v2/coupon/CouponTemplateVipController.java +++ b/src/main/java/com/mzl/flower/web/v2/coupon/CouponTemplateVipController.java @@ -162,11 +162,17 @@ throw new ValidationException("会员等级不存在"); } - if (StringUtils.isNotBlank(dto.getCouponDiscountType()) - && dto.getCouponDiscountType().equals(CouponTypeEnum.DISCOUNT.getType()) - && dto.getMinOrderAmount().compareTo(dto.getCouponDiscountValue()) < 0) { - throw new ValidationException("订单金额不能小于折扣金额"); + if (StringUtils.isNotBlank(dto.getCouponDiscountType()) && dto.getCouponDiscountType().equals(CouponTypeEnum.DISCOUNT.getType())) { + + if(dto.getMinOrderAmount().compareTo(BigDecimal.ZERO)<=0){ + throw new ValidationException("优惠券使用条件不能小于0"); + } + if(dto.getMinOrderAmount().compareTo(dto.getCouponDiscountValue()) < 0){ + throw new ValidationException("优惠券使用条件不能小于面值金额"); + } + } + if (StringUtils.isNotBlank(dto.getCouponDiscountType()) && dto.getCouponDiscountType().equals(CouponTypeEnum.DISCOUNT.getType()) && dto.getCouponDiscountValue().compareTo(BigDecimal.ZERO) <= 0) { -- Gitblit v1.9.3