From 9384ba0d52a64bcb68fa152eca8abe06d4ab2ff3 Mon Sep 17 00:00:00 2001 From: halfninety <690534687@qq.com> Date: Sat, 3 Dec 2022 16:45:22 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=92=E6=9D=80=E7=9B=B8=E5=85=B3VO=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0example?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vo/activity/SeckillActivityBaseVO.java | 6 +++--- .../activity/SeckillActivityCreateReqVO.java | 5 ++--- .../activity/SeckillActivityDetailRespVO.java | 2 +- .../vo/activity/SeckillActivityPageReqVO.java | 2 +- .../vo/activity/SeckillActivityRespVO.java | 10 +++++----- .../activity/SeckillActivityUpdateReqVO.java | 4 ++-- .../seckill/vo/time/SeckillTimeBaseVO.java | 19 +++++++++---------- .../seckill/vo/time/SeckillTimePageReqVO.java | 6 +++--- .../seckill/vo/time/SeckillTimeRespVO.java | 16 ++++++++++------ .../vo/time/SeckillTimeSimpleRespVO.java | 4 ---- .../vo/time/SeckillTimeUpdateReqVO.java | 2 +- 11 files changed, 37 insertions(+), 39 deletions(-) delete mode 100644 yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/time/SeckillTimeSimpleRespVO.java diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/activity/SeckillActivityBaseVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/activity/SeckillActivityBaseVO.java index 774b45493..877e7553a 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/activity/SeckillActivityBaseVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/activity/SeckillActivityBaseVO.java @@ -14,9 +14,9 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.TIME_ZONE_DEFAULT; /** -* 秒杀活动 Base VO,提供给添加、修改、详细的子 VO 使用 -* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 -*/ + * 秒杀活动 Base VO,提供给添加、修改、详细的子 VO 使用 + * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 + */ @Data public class SeckillActivityBaseVO { diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/activity/SeckillActivityCreateReqVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/activity/SeckillActivityCreateReqVO.java index 8ed5a3119..58dbd0dd9 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/activity/SeckillActivityCreateReqVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/activity/SeckillActivityCreateReqVO.java @@ -11,7 +11,6 @@ import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; import java.util.List; -// TODO halfninety:检查下所有的 VO,需要保证 example 都写了哈。 @ApiModel("管理后台 - 秒杀活动创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) @@ -21,11 +20,11 @@ public class SeckillActivityCreateReqVO extends SeckillActivityBaseVO { @ApiModelProperty(value = "备注", example = "限时秒杀活动") private String remark; - @ApiModelProperty(value = "排序", required = true) + @ApiModelProperty(value = "排序", required = true, example = "1") @NotNull(message = "排序不能为空") private Integer sort; - @ApiModelProperty(value = "秒杀时段id", required = true) + @ApiModelProperty(value = "秒杀时段id", required = true, example = "1,3") @NotEmpty(message = "参与场次不能为空") private List timeIds; diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/activity/SeckillActivityDetailRespVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/activity/SeckillActivityDetailRespVO.java index 14bb9ff64..a8a079abf 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/activity/SeckillActivityDetailRespVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/activity/SeckillActivityDetailRespVO.java @@ -11,7 +11,7 @@ import java.util.List; @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) -public class SeckillActivityDetailRespVO extends SeckillActivityRespVO{ +public class SeckillActivityDetailRespVO extends SeckillActivityRespVO { /** * 商品列表 diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/activity/SeckillActivityPageReqVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/activity/SeckillActivityPageReqVO.java index 49cfb5a0e..34808d523 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/activity/SeckillActivityPageReqVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/activity/SeckillActivityPageReqVO.java @@ -26,7 +26,7 @@ public class SeckillActivityPageReqVO extends PageParam { @ApiModelProperty(value = "活动状态", example = "进行中") private Integer status; - @ApiModelProperty(value = "秒杀时段id") + @ApiModelProperty(value = "秒杀时段id", example = "1") private Long timeId; @ApiModelProperty(value = "创建时间") diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/activity/SeckillActivityRespVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/activity/SeckillActivityRespVO.java index 7201df5f1..50055f8b0 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/activity/SeckillActivityRespVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/activity/SeckillActivityRespVO.java @@ -15,22 +15,22 @@ import java.util.List; @ToString(callSuper = true) public class SeckillActivityRespVO extends SeckillActivityBaseVO { - @ApiModelProperty(value = "秒杀活动id", required = true, example = "1") + @ApiModelProperty(value = "秒杀活动id", required = true, example = "1") private Long id; - @ApiModelProperty(value = "付款订单数", required = true) + @ApiModelProperty(value = "付款订单数", required = true, example = "1") private Integer orderCount; - @ApiModelProperty(value = "付款人数", required = true) + @ApiModelProperty(value = "付款人数", required = true, example = "1") private Integer userCount; @ApiModelProperty(value = "创建时间", required = true) private LocalDateTime createTime; - @ApiModelProperty(value = "秒杀时段id", required = true) + @ApiModelProperty(value = "秒杀时段id", required = true, example = "1,3") private List timeIds; - @ApiModelProperty(value = "排序", required = true) + @ApiModelProperty(value = "排序", required = true, example = "1") private Integer sort; @ApiModelProperty(value = "备注", example = "限时秒杀活动") diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/activity/SeckillActivityUpdateReqVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/activity/SeckillActivityUpdateReqVO.java index da81a5dc9..e55739a4b 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/activity/SeckillActivityUpdateReqVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/activity/SeckillActivityUpdateReqVO.java @@ -24,11 +24,11 @@ public class SeckillActivityUpdateReqVO extends SeckillActivityBaseVO { @ApiModelProperty(value = "备注", example = "限时秒杀活动") private String remark; - @ApiModelProperty(value = "排序", required = true) + @ApiModelProperty(value = "排序", required = true, example = "1") @NotNull(message = "排序不能为空") private Integer sort; - @ApiModelProperty(value = "秒杀时段id", required = true) + @ApiModelProperty(value = "秒杀时段id", required = true, example = "1,3") @NotEmpty(message = "秒杀时段id不能为空") private List timeIds; diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/time/SeckillTimeBaseVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/time/SeckillTimeBaseVO.java index 5775e98c6..4fc8c8f3c 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/time/SeckillTimeBaseVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/time/SeckillTimeBaseVO.java @@ -1,28 +1,27 @@ package cn.iocoder.yudao.module.promotion.controller.admin.seckill.vo.time; -import lombok.*; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import javax.validation.constraints.NotNull; import java.time.LocalTime; -import io.swagger.annotations.*; -import javax.validation.constraints.*; - /** -* 秒杀时段 Base VO,提供给添加、修改、详细的子 VO 使用 -* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 -*/ + * 秒杀时段 Base VO,提供给添加、修改、详细的子 VO 使用 + * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成 + */ @Data public class SeckillTimeBaseVO { - @ApiModelProperty(value = "秒杀时段名称", required = true) + @ApiModelProperty(value = "秒杀时段名称", required = true, example = "上午场") @NotNull(message = "秒杀时段名称不能为空") private String name; - @ApiModelProperty(value = "开始时间点", required = true) + @ApiModelProperty(value = "开始时间点", required = true, example = "16:30:40") @NotNull(message = "开始时间点不能为空") private LocalTime startTime; - @ApiModelProperty(value = "结束时间点", required = true) + @ApiModelProperty(value = "结束时间点", required = true, example = "16:30:40") @NotNull(message = "结束时间点不能为空") private LocalTime endTime; diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/time/SeckillTimePageReqVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/time/SeckillTimePageReqVO.java index 7c01ce497..b482ca34e 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/time/SeckillTimePageReqVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/time/SeckillTimePageReqVO.java @@ -16,14 +16,14 @@ import java.time.LocalTime; @ToString(callSuper = true) public class SeckillTimePageReqVO extends PageParam { - @ApiModelProperty(value = "秒杀时段名称") + @ApiModelProperty(value = "秒杀时段名称", example = "上午场") private String name; - @ApiModelProperty(value = "开始时间点") + @ApiModelProperty(value = "开始时间点", example = "16:30:40") @DateTimeFormat(pattern = "HH:mm:ss") private LocalTime startTime; - @ApiModelProperty(value = "结束时间点") + @ApiModelProperty(value = "结束时间点", example = "16:30:40") @DateTimeFormat(pattern = "HH:mm:ss") private LocalTime endTime; diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/time/SeckillTimeRespVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/time/SeckillTimeRespVO.java index 165993ac9..632020191 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/time/SeckillTimeRespVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/time/SeckillTimeRespVO.java @@ -1,8 +1,12 @@ package cn.iocoder.yudao.module.promotion.controller.admin.seckill.vo.time; -import lombok.*; -import java.util.*; -import io.swagger.annotations.*; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +import java.time.LocalDateTime; @ApiModel("管理后台 - 秒杀时段 Response VO") @Data @@ -10,13 +14,13 @@ import io.swagger.annotations.*; @ToString(callSuper = true) public class SeckillTimeRespVO extends SeckillTimeBaseVO { - @ApiModelProperty(value = "编号", required = true) + @ApiModelProperty(value = "编号", required = true, example = "1") private Long id; - @ApiModelProperty(value = "秒杀活动数量", required = true) + @ApiModelProperty(value = "秒杀活动数量", required = true, example = "1") private Integer seckillActivityCount; @ApiModelProperty(value = "创建时间", required = true) - private Date createTime; + private LocalDateTime createTime; } diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/time/SeckillTimeSimpleRespVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/time/SeckillTimeSimpleRespVO.java deleted file mode 100644 index c068293da..000000000 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/time/SeckillTimeSimpleRespVO.java +++ /dev/null @@ -1,4 +0,0 @@ -package cn.iocoder.yudao.module.promotion.controller.admin.seckill.vo.time; - -public class SeckillTimeSimpleRespVO { -} diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/time/SeckillTimeUpdateReqVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/time/SeckillTimeUpdateReqVO.java index 50d5f03ce..72931938d 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/time/SeckillTimeUpdateReqVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/time/SeckillTimeUpdateReqVO.java @@ -14,7 +14,7 @@ import javax.validation.constraints.NotNull; @ToString(callSuper = true) public class SeckillTimeUpdateReqVO extends SeckillTimeBaseVO { - @ApiModelProperty(value = "编号", required = true) + @ApiModelProperty(value = "编号", required = true, example = "1") @NotNull(message = "编号不能为空") private Long id;