From d68f16d615c5d7926760c01d6a0b3b17eed9a70d Mon Sep 17 00:00:00 2001 From: 陶杰 <1378534974@qq.com> Date: 星期六, 21 九月 2024 23:52:10 +0800 Subject: [PATCH] 1.优惠券-所有使用条件和优惠券面额最小值设置为0.01 --- src/main/java/com/mzl/flower/dto/request/coupon/CreateCouponTemplateVipDTO.java | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/mzl/flower/dto/request/coupon/CreateCouponTemplateVipDTO.java b/src/main/java/com/mzl/flower/dto/request/coupon/CreateCouponTemplateVipDTO.java index a87686a..37bfa1d 100644 --- a/src/main/java/com/mzl/flower/dto/request/coupon/CreateCouponTemplateVipDTO.java +++ b/src/main/java/com/mzl/flower/dto/request/coupon/CreateCouponTemplateVipDTO.java @@ -4,6 +4,8 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import javax.validation.constraints.DecimalMin; +import javax.validation.constraints.Max; import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import java.math.BigDecimal; @@ -41,6 +43,8 @@ */ @ApiModelProperty(value = "优惠券面值") @NotNull(message = "优惠券面值不能为空") + @Max(value = 99999999,message = "优惠券面值不能超过99999999") + @DecimalMin(value = "0.01", inclusive = true,message = "优惠券面值大于0") private BigDecimal couponDiscountValue; /** @@ -48,6 +52,8 @@ */ @ApiModelProperty(value = "使用条件") @NotNull(message = "使用条件不能为空") + @Max(value = 99999999,message = "使用条件不能超过99999999") + @DecimalMin(value = "0.01", inclusive = true,message = "使用条件大于0") private BigDecimal minOrderAmount; @@ -68,6 +74,7 @@ * 领取后有效时间整数,比如90(天,小时,分钟) */ @ApiModelProperty(value = "领取后有效时间整数") + @Max(value = 99999999,message = "领取后有效时间不能超过99999999") private Integer usageTimeNum; -- Gitblit v1.9.3