mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-08-15 10:41:54 +08:00
feat: knife4j springdoc
This commit is contained in:
@@ -15,28 +15,28 @@ import javax.validation.constraints.NotNull;
|
||||
@Data
|
||||
public class BannerBaseVO {
|
||||
|
||||
@Schema(title = "标题", required = true)
|
||||
@Schema(description = "标题", required = true)
|
||||
@NotNull(message = "标题不能为空")
|
||||
private String title;
|
||||
|
||||
@Schema(title = "跳转链接", required = true)
|
||||
@Schema(description = "跳转链接", required = true)
|
||||
@NotNull(message = "跳转链接不能为空")
|
||||
private String url;
|
||||
|
||||
@Schema(title = "图片地址", required = true)
|
||||
@Schema(description = "图片地址", required = true)
|
||||
@NotNull(message = "图片地址不能为空")
|
||||
private String picUrl;
|
||||
|
||||
@Schema(title = "排序", required = true)
|
||||
@Schema(description = "排序", required = true)
|
||||
@NotNull(message = "排序不能为空")
|
||||
private Integer sort;
|
||||
|
||||
@Schema(title = "状态", required = true)
|
||||
@Schema(description = "状态", required = true)
|
||||
@NotNull(message = "状态不能为空")
|
||||
@InEnum(CommonStatusEnum.class)
|
||||
private Integer status;
|
||||
|
||||
@Schema(title = "备注")
|
||||
@Schema(description = "备注")
|
||||
private String memo;
|
||||
|
||||
}
|
||||
|
@@ -7,7 +7,7 @@ import lombok.ToString;
|
||||
/**
|
||||
* @author xia
|
||||
*/
|
||||
@Schema(title = "管理后台 - Banner 创建 Request VO")
|
||||
@Schema(description = "管理后台 - Banner 创建 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
|
@@ -16,22 +16,22 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
|
||||
/**
|
||||
* @author xia
|
||||
*/
|
||||
@Schema(title = "管理后台 - Banner 分页 Request VO")
|
||||
@Schema(description = "管理后台 - Banner 分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BannerPageReqVO extends PageParam {
|
||||
|
||||
@Schema(title = "标题")
|
||||
@Schema(description = "标题")
|
||||
private String title;
|
||||
|
||||
|
||||
@Schema(title = "状态")
|
||||
@Schema(description = "状态")
|
||||
@InEnum(CommonStatusEnum.class)
|
||||
private Integer status;
|
||||
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@Schema(title = "创建时间")
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
|
@@ -10,16 +10,16 @@ import java.time.LocalDateTime;
|
||||
/**
|
||||
* @author xia
|
||||
*/
|
||||
@Schema(title = "管理后台 - Banner Response VO")
|
||||
@Schema(description = "管理后台 - Banner Response VO")
|
||||
@Data
|
||||
@ToString(callSuper = true)
|
||||
public class BannerRespVO extends BannerBaseVO {
|
||||
|
||||
@Schema(title = "banner编号", required = true)
|
||||
@Schema(description = "banner编号", required = true)
|
||||
@NotNull(message = "banner编号不能为空")
|
||||
private Long id;
|
||||
|
||||
@Schema(title = "创建时间", required = true)
|
||||
@Schema(description = "创建时间", required = true)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
|
@@ -10,13 +10,13 @@ import javax.validation.constraints.NotNull;
|
||||
/**
|
||||
* @author xia
|
||||
*/
|
||||
@Schema(title = "管理后台 - Banner更新 Request VO")
|
||||
@Schema(description = "管理后台 - Banner更新 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BannerUpdateReqVO extends BannerBaseVO {
|
||||
|
||||
@Schema(title = "banner 编号", required = true)
|
||||
@Schema(description = "banner 编号", required = true)
|
||||
@NotNull(message = "banner 编号不能为空")
|
||||
private Long id;
|
||||
|
||||
|
@@ -24,76 +24,76 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.TIME_ZONE_DE
|
||||
public class CouponBaseVO {
|
||||
|
||||
// ========== 基本信息 BEGIN ==========
|
||||
@Schema(title = "优惠劵模板编号", required = true, example = "1024")
|
||||
@Schema(description = "优惠劵模板编号", required = true, example = "1024")
|
||||
@NotNull(message = "优惠劵模板编号不能为空")
|
||||
private Integer templateId;
|
||||
|
||||
@Schema(title = "优惠劵名", required = true, example = "春节送送送")
|
||||
@Schema(description = "优惠劵名", required = true, example = "春节送送送")
|
||||
@NotNull(message = "优惠劵名不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(title = "优惠码状态", required = true, example = "1", description = "参见 CouponStatusEnum 枚举")
|
||||
@Schema(description = "优惠码状态,参见 CouponStatusEnum 枚举", required = true, example = "1")
|
||||
private Integer status;
|
||||
|
||||
// ========== 基本信息 END ==========
|
||||
|
||||
// ========== 领取情况 BEGIN ==========
|
||||
@Schema(title = "用户编号", required = true, example = "1")
|
||||
@Schema(description = "用户编号", required = true, example = "1")
|
||||
@NotNull(message = "用户编号不能为空")
|
||||
private Long userId;
|
||||
|
||||
@Schema(title = "领取方式", required = true, example = "1", description = "参见 CouponTakeTypeEnum 枚举类")
|
||||
@Schema(description = "领取方式,参见 CouponTakeTypeEnum 枚举类", required = true, example = "1")
|
||||
@NotNull(message = "领取方式不能为空")
|
||||
private Integer takeType;
|
||||
// ========== 领取情况 END ==========
|
||||
|
||||
// ========== 使用规则 BEGIN ==========
|
||||
@Schema(title = "是否设置满多少金额可用", required = true, example = "100", description = "单位:分;0 - 不限制")
|
||||
@Schema(description = "是否设置满多少金额可用,单位:分;0 - 不限制", required = true, example = "100")
|
||||
@NotNull(message = "是否设置满多少金额可用不能为空")
|
||||
private Integer usePrice;
|
||||
|
||||
@Schema(title = "固定日期 - 生效开始时间")
|
||||
@Schema(description = "固定日期 - 生效开始时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND, timezone = TIME_ZONE_DEFAULT)
|
||||
private LocalDateTime validStartTime;
|
||||
|
||||
@Schema(title = "固定日期 - 生效结束时间")
|
||||
@Schema(description = "固定日期 - 生效结束时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND, timezone = TIME_ZONE_DEFAULT)
|
||||
private LocalDateTime validEndTime;
|
||||
|
||||
@Schema(title = "商品范围", required = true, example = "1", description = "参见 PromotionProductScopeEnum 枚举类")
|
||||
@Schema(description = "商品范围,参见 PromotionProductScopeEnum 枚举类", required = true, example = "1")
|
||||
@NotNull(message = "商品范围不能为空")
|
||||
@InEnum(PromotionProductScopeEnum.class)
|
||||
private Integer productScope;
|
||||
|
||||
@Schema(title = "商品 SPU 编号的数组", example = "1,3")
|
||||
@Schema(description = "商品 SPU 编号的数组", example = "1,3")
|
||||
private List<Long> productSpuIds;
|
||||
// ========== 使用规则 END ==========
|
||||
|
||||
// ========== 使用效果 BEGIN ==========
|
||||
@Schema(title = "优惠类型", required = true, example = "1", description = "参见 PromotionDiscountTypeEnum 枚举")
|
||||
@Schema(description = "优惠类型,参见 PromotionDiscountTypeEnum 枚举", required = true, example = "1")
|
||||
@NotNull(message = "优惠类型不能为空")
|
||||
@InEnum(PromotionDiscountTypeEnum.class)
|
||||
private Integer discountType;
|
||||
|
||||
@Schema(title = "折扣百分比", example = "80", description = "例如说,80% 为 80")
|
||||
@Schema(description = "折扣百分比,例如说,80% 为 80", example = "80")
|
||||
private Integer discountPercent;
|
||||
|
||||
@Schema(title = "优惠金额", example = "10", description = "单位:分")
|
||||
@Schema(description = "优惠金额,单位:分", example = "10")
|
||||
@Min(value = 0, message = "优惠金额需要大于等于 0")
|
||||
private Integer discountPrice;
|
||||
|
||||
@Schema(title = "折扣上限", example = "100", description = "单位:分,仅在 discountType 为 PERCENT 使用")
|
||||
@Schema(description = "折扣上限,单位:分,仅在 discountType 为 PERCENT 使用", example = "100")
|
||||
private Integer discountLimitPrice;
|
||||
// ========== 使用效果 END ==========
|
||||
|
||||
// ========== 使用情况 BEGIN ==========
|
||||
|
||||
@Schema(title = "使用订单号", example = "4096")
|
||||
@Schema(description = "使用订单号", example = "4096")
|
||||
private Long useOrderId;
|
||||
|
||||
@Schema(title = "使用时间")
|
||||
@Schema(description = "使用时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND, timezone = TIME_ZONE_DEFAULT)
|
||||
private LocalDateTime useTime;
|
||||
|
@@ -5,13 +5,13 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
@Schema(title = "管理后台 - 优惠劵分页的每一项 Response VO")
|
||||
@Schema(description = "管理后台 - 优惠劵分页的每一项 Response VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class CouponPageItemRespVO extends CouponRespVO {
|
||||
|
||||
@Schema(title = "用户昵称", example = "老芋艿")
|
||||
@Schema(description = "用户昵称", example = "老芋艿")
|
||||
private String nickname;
|
||||
|
||||
}
|
||||
|
@@ -11,23 +11,23 @@ import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(title = "管理后台 - 优惠劵分页 Request VO")
|
||||
@Schema(description = "管理后台 - 优惠劵分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class CouponPageReqVO extends PageParam {
|
||||
|
||||
@Schema(title = "优惠劵模板编号", example = "2048")
|
||||
@Schema(description = "优惠劵模板编号", example = "2048")
|
||||
private Long templateId;
|
||||
|
||||
@Schema(title = "优惠码状态", example = "1", description = "参见 CouponStatusEnum 枚举")
|
||||
@Schema(description = "优惠码状态,参见 CouponStatusEnum 枚举", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(title = "创建时间")
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(title = "用户昵称", example = "芋艿", description = "模糊匹配")
|
||||
@Schema(description = "用户昵称,模糊匹配", example = "芋艿")
|
||||
private String nickname;
|
||||
|
||||
}
|
||||
|
@@ -7,16 +7,16 @@ import lombok.ToString;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(title = "管理后台 - 优惠劵 Response VO")
|
||||
@Schema(description = "管理后台 - 优惠劵 Response VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class CouponRespVO extends CouponBaseVO {
|
||||
|
||||
@Schema(title = "优惠劵编号", required = true, example = "1024")
|
||||
@Schema(description = "优惠劵编号", required = true, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(title = "创建时间", required = true)
|
||||
@Schema(description = "创建时间", required = true)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
|
@@ -29,70 +29,70 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.TIME_ZONE_DE
|
||||
@Data
|
||||
public class CouponTemplateBaseVO {
|
||||
|
||||
@Schema(title = "优惠劵名", required = true, example = "春节送送送")
|
||||
@Schema(description = "优惠劵名", required = true, example = "春节送送送")
|
||||
@NotNull(message = "优惠劵名不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(title = "发行总量", required = true, example = "1024", description = "-1 - 则表示不限制发放数量")
|
||||
@Schema(description = "发行总量,-1 - 则表示不限制发放数量", required = true, example = "1024")
|
||||
@NotNull(message = "发行总量不能为空")
|
||||
private Integer totalCount;
|
||||
|
||||
@Schema(title = "每人限领个数", required = true, example = "66", description = "-1 - 则表示不限制")
|
||||
@Schema(description = "每人限领个数,-1 - 则表示不限制", required = true, example = "66")
|
||||
@NotNull(message = "每人限领个数不能为空")
|
||||
private Integer takeLimitCount;
|
||||
|
||||
@Schema(title = "领取方式", required = true, example = "1", description = "参见 CouponTakeTypeEnum 枚举类")
|
||||
@Schema(description = "领取方式,参见 CouponTakeTypeEnum 枚举类", required = true, example = "1")
|
||||
@NotNull(message = "领取方式不能为空")
|
||||
private Integer takeType;
|
||||
|
||||
@Schema(title = "是否设置满多少金额可用", required = true, example = "100", description = "单位:分;0 - 不限制")
|
||||
@Schema(description = "是否设置满多少金额可用,单位:分;0 - 不限制", required = true, example = "100")
|
||||
@NotNull(message = "是否设置满多少金额可用不能为空")
|
||||
private Integer usePrice;
|
||||
|
||||
@Schema(title = "商品范围", required = true, example = "1", description = "参见 PromotionProductScopeEnum 枚举类")
|
||||
@Schema(description = "商品范围,参见 PromotionProductScopeEnum 枚举类", required = true, example = "1")
|
||||
@NotNull(message = "商品范围不能为空")
|
||||
@InEnum(PromotionProductScopeEnum.class)
|
||||
private Integer productScope;
|
||||
|
||||
@Schema(title = "商品 SPU 编号的数组", example = "1,3")
|
||||
@Schema(description = "商品 SPU 编号的数组", example = "1,3")
|
||||
private List<Long> productSpuIds;
|
||||
|
||||
@Schema(title = "生效日期类型", required = true, example = "1")
|
||||
@Schema(description = "生效日期类型", required = true, example = "1")
|
||||
@NotNull(message = "生效日期类型不能为空")
|
||||
@InEnum(CouponTemplateValidityTypeEnum.class)
|
||||
private Integer validityType;
|
||||
|
||||
@Schema(title = "固定日期 - 生效开始时间")
|
||||
@Schema(description = "固定日期 - 生效开始时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND, timezone = TIME_ZONE_DEFAULT)
|
||||
private LocalDateTime validStartTime;
|
||||
|
||||
@Schema(title = "固定日期 - 生效结束时间")
|
||||
@Schema(description = "固定日期 - 生效结束时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@JsonFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND, timezone = TIME_ZONE_DEFAULT)
|
||||
private LocalDateTime validEndTime;
|
||||
|
||||
@Schema(title = "领取日期 - 开始天数")
|
||||
@Schema(description = "领取日期 - 开始天数")
|
||||
@Min(value = 0L, message = "开始天数必须大于 0")
|
||||
private Integer fixedStartTerm;
|
||||
|
||||
@Schema(title = "领取日期 - 结束天数")
|
||||
@Schema(description = "领取日期 - 结束天数")
|
||||
@Min(value = 1L, message = "开始天数必须大于 1")
|
||||
private Integer fixedEndTerm;
|
||||
|
||||
@Schema(title = "优惠类型", required = true, example = "1", description = "参见 PromotionDiscountTypeEnum 枚举")
|
||||
@Schema(description = "优惠类型,参见 PromotionDiscountTypeEnum 枚举", required = true, example = "1")
|
||||
@NotNull(message = "优惠类型不能为空")
|
||||
@InEnum(PromotionDiscountTypeEnum.class)
|
||||
private Integer discountType;
|
||||
|
||||
@Schema(title = "折扣百分比", example = "80", description = "例如说,80% 为 80")
|
||||
@Schema(description = "折扣百分比,例如说,80% 为 80", example = "80")
|
||||
private Integer discountPercent;
|
||||
|
||||
@Schema(title = "优惠金额", example = "10", description = "单位:分")
|
||||
@Schema(description = "优惠金额,单位:分", example = "10")
|
||||
@Min(value = 0, message = "优惠金额需要大于等于 0")
|
||||
private Integer discountPrice;
|
||||
|
||||
@Schema(title = "折扣上限", example = "100", description = "单位:分,仅在 discountType 为 PERCENT 使用")
|
||||
@Schema(description = "折扣上限,单位:分,仅在 discountType 为 PERCENT 使用", example = "100")
|
||||
private Integer discountLimitPrice;
|
||||
|
||||
@AssertTrue(message = "商品 SPU 编号的数组不能为空")
|
||||
|
@@ -4,7 +4,7 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
@Schema(title = "管理后台 - 优惠劵模板创建 Request VO")
|
||||
@Schema(description = "管理后台 - 优惠劵模板创建 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
|
@@ -11,22 +11,22 @@ import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(title = "管理后台 - 优惠劵模板分页 Request VO")
|
||||
@Schema(description = "管理后台 - 优惠劵模板分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class CouponTemplatePageReqVO extends PageParam {
|
||||
|
||||
@Schema(title = "优惠劵名", example = "你好")
|
||||
@Schema(description = "优惠劵名", example = "你好")
|
||||
private String name;
|
||||
|
||||
@Schema(title = "状态", example = "1", description = "参见 CommonStatusEnum 枚举类")
|
||||
@Schema(description = "状态,参见 CommonStatusEnum 枚举类", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(title = "优惠类型", example = "1", description = "参见 PromotionDiscountTypeEnum 枚举")
|
||||
@Schema(description = "优惠类型,参见 PromotionDiscountTypeEnum 枚举", example = "1")
|
||||
private Integer discountType;
|
||||
|
||||
@Schema(title = "创建时间")
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
|
@@ -9,26 +9,26 @@ import lombok.ToString;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(title = "管理后台 - 优惠劵模板 Response VO")
|
||||
@Schema(description = "管理后台 - 优惠劵模板 Response VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class CouponTemplateRespVO extends CouponTemplateBaseVO {
|
||||
|
||||
@Schema(title = "模板编号", required = true, example = "1024")
|
||||
@Schema(description = "模板编号", required = true, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(title = "状态", required = true, example = "1")
|
||||
@Schema(description = "状态", required = true, example = "1")
|
||||
@InEnum(CommonStatusEnum.class)
|
||||
private Integer status;
|
||||
|
||||
@Schema(title = "领取优惠券的数量", required = true, example = "1024")
|
||||
@Schema(description = "领取优惠券的数量", required = true, example = "1024")
|
||||
private Integer takeCount;
|
||||
|
||||
@Schema(title = "使用优惠券的次数", required = true, example = "2048")
|
||||
@Schema(description = "使用优惠券的次数", required = true, example = "2048")
|
||||
private Integer useCount;
|
||||
|
||||
@Schema(title = "创建时间", required = true)
|
||||
@Schema(description = "创建时间", required = true)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
|
@@ -7,13 +7,13 @@ import lombok.ToString;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Schema(title = "管理后台 - 优惠劵模板更新 Request VO")
|
||||
@Schema(description = "管理后台 - 优惠劵模板更新 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class CouponTemplateUpdateReqVO extends CouponTemplateBaseVO {
|
||||
|
||||
@Schema(title = "模板编号", required = true, example = "1024")
|
||||
@Schema(description = "模板编号", required = true, example = "1024")
|
||||
@NotNull(message = "模板编号不能为空")
|
||||
private Long id;
|
||||
|
||||
|
@@ -7,15 +7,15 @@ import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@Schema(title = "管理后台 - 优惠劵模板更新状态 Request VO")
|
||||
@Schema(description = "管理后台 - 优惠劵模板更新状态 Request VO")
|
||||
@Data
|
||||
public class CouponTemplateUpdateStatusReqVO {
|
||||
|
||||
@Schema(title = "优惠劵模板编号", required = true, example = "1024")
|
||||
@Schema(description = "优惠劵模板编号", required = true, example = "1024")
|
||||
@NotNull(message = "优惠劵模板编号不能为空")
|
||||
private Long id;
|
||||
|
||||
@Schema(title = "状态", required = true, example = "1", description = "见 CommonStatusEnum 枚举")
|
||||
@Schema(description = "状态,见 CommonStatusEnum 枚举", required = true, example = "1")
|
||||
@NotNull(message = "状态不能为空")
|
||||
@InEnum(value = CommonStatusEnum.class, message = "修改状态必须是 {value}")
|
||||
private Integer status;
|
||||
|
@@ -22,44 +22,44 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
|
||||
@Data
|
||||
public class DiscountActivityBaseVO {
|
||||
|
||||
@Schema(title = "活动标题", required = true, example = "一个标题")
|
||||
@Schema(description = "活动标题", required = true, example = "一个标题")
|
||||
@NotNull(message = "活动标题不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(title = "开始时间", required = true)
|
||||
@Schema(description = "开始时间", required = true)
|
||||
@NotNull(message = "开始时间不能为空")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime startTime;
|
||||
|
||||
@Schema(title = "结束时间", required = true)
|
||||
@Schema(description = "结束时间", required = true)
|
||||
@NotNull(message = "结束时间不能为空")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime endTime;
|
||||
|
||||
@Schema(title = "备注", example = "我是备注")
|
||||
@Schema(description = "备注", example = "我是备注")
|
||||
private String remark;
|
||||
|
||||
@Schema(title = "商品")
|
||||
@Schema(description = "商品")
|
||||
@Data
|
||||
public static class Product {
|
||||
|
||||
@Schema(title = "商品 SPU 编号", required = true, example = "1")
|
||||
@Schema(description = "商品 SPU 编号", required = true, example = "1")
|
||||
@NotNull(message = "商品 SPU 编号不能为空")
|
||||
private Long spuId;
|
||||
|
||||
@Schema(title = "商品 SKU 编号", required = true, example = "1")
|
||||
@Schema(description = "商品 SKU 编号", required = true, example = "1")
|
||||
@NotNull(message = "商品 SKU 编号不能为空")
|
||||
private Long skuId;
|
||||
|
||||
@Schema(title = "优惠类型", required = true, example = "1", description = "参见 PromotionDiscountTypeEnum 枚举")
|
||||
@Schema(description = "优惠类型,参见 PromotionDiscountTypeEnum 枚举", required = true, example = "1")
|
||||
@NotNull(message = "优惠类型不能为空")
|
||||
@InEnum(PromotionDiscountTypeEnum.class)
|
||||
private Integer discountType;
|
||||
|
||||
@Schema(title = "折扣百分比", example = "80", description = "例如说,80% 为 80")
|
||||
@Schema(description = "折扣百分比,例如说,80% 为 80", example = "80")
|
||||
private Integer discountPercent;
|
||||
|
||||
@Schema(title = "优惠金额", example = "10", description = "单位:分")
|
||||
@Schema(description = "优惠金额,单位:分", example = "10")
|
||||
@Min(value = 0, message = "优惠金额需要大于等于 0")
|
||||
private Integer discountPrice;
|
||||
|
||||
|
@@ -8,7 +8,7 @@ import javax.validation.Valid;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(title = "管理后台 - 限时折扣活动创建 Request VO")
|
||||
@Schema(description = "管理后台 - 限时折扣活动创建 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
|
@@ -6,7 +6,7 @@ import lombok.ToString;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Schema(title = "管理后台 - 限时折扣活动的详细 Response VO")
|
||||
@Schema(description = "管理后台 - 限时折扣活动的详细 Response VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
|
@@ -11,19 +11,19 @@ import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(title = "管理后台 - 限时折扣活动分页 Request VO")
|
||||
@Schema(description = "管理后台 - 限时折扣活动分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class DiscountActivityPageReqVO extends PageParam {
|
||||
|
||||
@Schema(title = "活动标题", example = "一个标题")
|
||||
@Schema(description = "活动标题", example = "一个标题")
|
||||
private String name;
|
||||
|
||||
@Schema(title = "活动状态", example = "1")
|
||||
@Schema(description = "活动状态", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(title = "创建时间")
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
|
@@ -8,20 +8,20 @@ import lombok.ToString;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(title = "管理后台 - 限时折扣活动 Response VO")
|
||||
@Schema(description = "管理后台 - 限时折扣活动 Response VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class DiscountActivityRespVO extends DiscountActivityBaseVO {
|
||||
|
||||
@Schema(title = "活动编号", required = true, example = "1024")
|
||||
@Schema(description = "活动编号", required = true, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@Schema(title = "活动状态", required = true, example = "1")
|
||||
@Schema(description = "活动状态", required = true, example = "1")
|
||||
@NotNull(message = "活动状态不能为空")
|
||||
private Integer status;
|
||||
|
||||
@Schema(title = "创建时间", required = true)
|
||||
@Schema(description = "创建时间", required = true)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
|
@@ -10,13 +10,13 @@ import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(title = "管理后台 - 限时折扣活动更新 Request VO")
|
||||
@Schema(description = "管理后台 - 限时折扣活动更新 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class DiscountActivityUpdateReqVO extends DiscountActivityBaseVO {
|
||||
|
||||
@Schema(title = "活动编号", required = true, example = "1024")
|
||||
@Schema(description = "活动编号", required = true, example = "1024")
|
||||
@NotNull(message = "活动编号不能为空")
|
||||
private Long id;
|
||||
|
||||
|
@@ -25,35 +25,35 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
|
||||
@Data
|
||||
public class RewardActivityBaseVO {
|
||||
|
||||
@Schema(title = "活动标题", required = true, example = "满啦满啦")
|
||||
@Schema(description = "活动标题", required = true, example = "满啦满啦")
|
||||
@NotNull(message = "活动标题不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(title = "开始时间", required = true)
|
||||
@Schema(description = "开始时间", required = true)
|
||||
@NotNull(message = "开始时间不能为空")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime startTime;
|
||||
|
||||
@Schema(title = "结束时间", required = true)
|
||||
@Schema(description = "结束时间", required = true)
|
||||
@NotNull(message = "结束时间不能为空")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
@Future(message = "结束时间必须大于当前时间")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
@Schema(title = "备注", example = "biubiubiu")
|
||||
@Schema(description = "备注", example = "biubiubiu")
|
||||
private String remark;
|
||||
|
||||
@Schema(title = "条件类型", required = true, example = "1")
|
||||
@Schema(description = "条件类型", required = true, example = "1")
|
||||
@NotNull(message = "条件类型不能为空")
|
||||
@InEnum(value = PromotionConditionTypeEnum.class, message = "条件类型必须是 {value}")
|
||||
private Integer conditionType;
|
||||
|
||||
@Schema(title = "商品范围", required = true, example = "1")
|
||||
@Schema(description = "商品范围", required = true, example = "1")
|
||||
@NotNull(message = "商品范围不能为空")
|
||||
@InEnum(value = PromotionConditionTypeEnum.class, message = "商品范围必须是 {value}")
|
||||
private Integer productScope;
|
||||
|
||||
@Schema(title = "商品 SPU 编号的数组", example = "1,2,3")
|
||||
@Schema(description = "商品 SPU 编号的数组", example = "1,2,3")
|
||||
private List<Long> productSpuIds;
|
||||
|
||||
/**
|
||||
@@ -62,29 +62,29 @@ public class RewardActivityBaseVO {
|
||||
@Valid // 校验下子对象
|
||||
private List<Rule> rules;
|
||||
|
||||
@Schema(title = "优惠规则")
|
||||
@Schema(description = "优惠规则")
|
||||
@Data
|
||||
public static class Rule {
|
||||
|
||||
@Schema(title = "优惠门槛", required = true, example = "100", description = "1. 满 N 元,单位:分; 2. 满 N 件")
|
||||
@Schema(description = "优惠门槛,1. 满 N 元,单位:分; 2. 满 N 件", required = true, example = "100")
|
||||
@Min(value = 1L, message = "优惠门槛必须大于等于 1")
|
||||
private Integer limit;
|
||||
|
||||
@Schema(title = "优惠价格", required = true, example = "100", description = "单位:分")
|
||||
@Schema(description = "优惠价格,单位:分", required = true, example = "100")
|
||||
@Min(value = 1L, message = "优惠价格必须大于等于 1")
|
||||
private Integer discountPrice;
|
||||
|
||||
@Schema(title = "是否包邮", required = true, example = "true")
|
||||
@Schema(description = "是否包邮", required = true, example = "true")
|
||||
private Boolean freeDelivery;
|
||||
|
||||
@Schema(title = "赠送的积分", required = true, example = "100")
|
||||
@Schema(description = "赠送的积分", required = true, example = "100")
|
||||
@Min(value = 1L, message = "赠送的积分必须大于等于 1")
|
||||
private Integer point;
|
||||
|
||||
@Schema(title = "赠送的优惠劵编号的数组", example = "1,2,3")
|
||||
@Schema(description = "赠送的优惠劵编号的数组", example = "1,2,3")
|
||||
private List<Long> couponIds;
|
||||
|
||||
@Schema(title = "赠送的优惠卷数量的数组", example = "1,2,3")
|
||||
@Schema(description = "赠送的优惠卷数量的数组", example = "1,2,3")
|
||||
private List<Integer> couponCounts;
|
||||
|
||||
@AssertTrue(message = "优惠劵和数量必须一一对应")
|
||||
|
@@ -2,7 +2,7 @@ package cn.iocoder.yudao.module.promotion.controller.admin.reward.vo;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
@Schema(title = "管理后台 - 满减送活动创建 Request VO")
|
||||
@Schema(description = "管理后台 - 满减送活动创建 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
|
@@ -3,16 +3,16 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
|
||||
@Schema(title = "管理后台 - 满减送活动分页 Request VO")
|
||||
@Schema(description = "管理后台 - 满减送活动分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class RewardActivityPageReqVO extends PageParam {
|
||||
|
||||
@Schema(title = "活动标题", example = "满啦满啦")
|
||||
@Schema(description = "活动标题", example = "满啦满啦")
|
||||
private String name;
|
||||
|
||||
@Schema(title = "活动状态", example = "1")
|
||||
@Schema(description = "活动状态", example = "1")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
|
@@ -7,19 +7,19 @@ import lombok.ToString;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(title = "管理后台 - 满减送活动 Response VO")
|
||||
@Schema(description = "管理后台 - 满减送活动 Response VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class RewardActivityRespVO extends RewardActivityBaseVO {
|
||||
|
||||
@Schema(title = "活动编号", required = true, example = "1024")
|
||||
@Schema(description = "活动编号", required = true, example = "1024")
|
||||
private Integer id;
|
||||
|
||||
@Schema(title = "活动状态", required = true, example = "1")
|
||||
@Schema(description = "活动状态", required = true, example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(title = "创建时间", required = true)
|
||||
@Schema(description = "创建时间", required = true)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
|
@@ -3,13 +3,13 @@ import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
@Schema(title = "管理后台 - 满减送活动更新 Request VO")
|
||||
@Schema(description = "管理后台 - 满减送活动更新 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class RewardActivityUpdateReqVO extends RewardActivityBaseVO {
|
||||
|
||||
@Schema(title = "活动编号", required = true, example = "1024")
|
||||
@Schema(description = "活动编号", required = true, example = "1024")
|
||||
@NotNull(message = "活动编号不能为空")
|
||||
private Long id;
|
||||
|
||||
|
Reference in New Issue
Block a user