gongzuming
2024-09-19 a768dc3daa04d35fedfbe75c0a59b9b2545b85c4
src/main/java/com/mzl/flower/dto/request/coupon/CreateCouponTemplateDTO.java
对比新文件
@@ -0,0 +1,140 @@
package com.mzl.flower.dto.request.coupon;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;
@Data
public class CreateCouponTemplateDTO  {
    @ApiModelProperty(value = "id")
    private String id;
    /**
     * 优惠券名称
     */
    @ApiModelProperty(value = "couponName")
    @NotEmpty(message = "优惠券名称不能为空")
    private String couponName;
    /**
     * 优惠券类型(COUPON_TYPE)满减和无门槛
     */
    @ApiModelProperty(value = "优惠券类型")
    @NotEmpty(message = "优惠券类型不能为空")
    private String couponDiscountType;
    /**
     * 领取渠道(COUPON_GET_TYPE)首页弹窗、活动入口、领券中心
     */
    @ApiModelProperty(value = "领取渠道")
    @NotEmpty(message = "领取渠道不能为空")
    private String getType;
    /**
     * 优惠券描述(使用规则)
     */
    @ApiModelProperty(value = "使用规则")
    @NotEmpty(message = "使用规则不能为空")
    private String couponDescription;
    /**
     * 领取开始时间
     */
    @ApiModelProperty(value = "领取开始时间")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss" ,timezone="GMT+8")
    @DateTimeFormat
    @NotNull(message = "领取开始时间不能为空")
    private LocalDateTime getStartDate;
    /**
     * 领取结束时间
     */
    @ApiModelProperty(value = "领取结束时间")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss" ,timezone="GMT+8")
    @DateTimeFormat
    @NotNull(message = "领取结束时间不能为空")
    private LocalDateTime getEndDate;
    /**
     * 使用时间类型(COUPON_USAGE_TIME_TYPE)与领取时间一致、固定时间、领取后有效
     */
    @ApiModelProperty(value = "使用时间类型")
    @NotEmpty(message = "使用时间类型不能为空")
    private String usageType;
    /**
     * 领取后有效类型(COUPON_usage_time_type)天、小时、分钟
     */
    @ApiModelProperty(value = "领取后有效类型 天、小时、分钟")
    private String usageTimeType;
    /**
     * 领取后有效时间整数,比如90(天,小时,分钟)
     */
    @ApiModelProperty(value = "领取后有效时间整数")
    private Integer usageTimeNum;
    /**
     * 使用开始时间
     */
    @ApiModelProperty(value = "使用时间-固定时间-开始日期")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss" ,timezone="GMT+8")
    @DateTimeFormat
    private LocalDateTime usageStartDate;
    /**
     * 使用结束时间
     */
    @ApiModelProperty(value = "使用时间-固定时间-结束日期")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss" ,timezone="GMT+8")
    @DateTimeFormat
    private LocalDateTime usageEndDate;
    /**
     * 使用条件,最小订单金额(可选)=》使用条件
     */
    @ApiModelProperty(value = "使用条件,满多少钱")
    @NotNull(message = "使用条件不能为空")
    private BigDecimal minOrderAmount;
    /**
     * 优惠券面值  折扣值(百分比或金额)
     */
    @ApiModelProperty(value = "优惠券面值")
    @NotNull(message = "优惠券面值不能为空")
    private BigDecimal couponDiscountValue;
    /**
     * 发放数量
     */
    @ApiModelProperty(value = "发放数量")
    @NotNull(message = "发放数量不能为空")
    private Integer couponAmount;
    /**
     * 每人限领
     */
    @ApiModelProperty(value = "每人限领")
    @NotNull(message = "每人限领不能为空")
    private Integer getLimit;
}