From a065b98bea77552f4b7037dc8f74f8c25b0bbb3d Mon Sep 17 00:00:00 2001 From: cloudroam <cloudroam> Date: 星期日, 29 九月 2024 16:06:41 +0800 Subject: [PATCH] add:返回操作时间 --- src/main/java/com/mzl/flower/dto/request/coupon/CreateCouponTemplateVipDTO.java | 15 +++++++++------ 1 files changed, 9 insertions(+), 6 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 160c46d..96a9138 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 @@ -1,10 +1,11 @@ package com.mzl.flower.dto.request.coupon; -import com.mzl.flower.base.annotation.DictTrans; 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; @@ -42,6 +43,8 @@ */ @ApiModelProperty(value = "优惠券面值") @NotNull(message = "优惠券面值不能为空") + @Max(value = 99999999,message = "优惠券面值不能超过99999999") + @DecimalMin(value = "0.01", inclusive = true,message = "优惠券面值大于0") private BigDecimal couponDiscountValue; /** @@ -49,6 +52,8 @@ */ @ApiModelProperty(value = "使用条件") @NotNull(message = "使用条件不能为空") + @Max(value = 99999999,message = "使用条件不能超过99999999") +// @DecimalMin(value = "0.01", inclusive = true,message = "使用条件大于0") private BigDecimal minOrderAmount; @@ -56,23 +61,21 @@ * 会员等级 */ @ApiModelProperty(value = "会员等级") - @NotEmpty(message = "会员等级不能为空") - private String vipGrade; + @NotNull(message = "会员等级不能为空") + private Integer memberId; /** * 领取后有效类型(COUPON_usage_time_type)天、小时、分钟 */ @ApiModelProperty(value = "领取后有效类型(COUPON_USAGE_TIME_TYPE)") - @DictTrans(target = "usageTimeTypeName",codeType = "COUPON_USAGE_TIME_TYPE") private String usageTimeType; /** * 领取后有效时间整数,比如90(天,小时,分钟) */ @ApiModelProperty(value = "领取后有效时间整数") + @Max(value = 99999999,message = "领取后有效时间不能超过99999999") private Integer usageTimeNum; - @ApiModelProperty(value = "领取后有效类型名称") - private String usageTimeTypeName; } -- Gitblit v1.9.3