Commit 9384ba0d52a64bcb68fa152eca8abe06d4ab2ff3

Authored by halfninety
1 parent 6808d3c1

秒杀相关VO添加example

Showing 11 changed files with 37 additions and 39 deletions
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_ @@ -14,9 +14,9 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
14 import static cn.iocoder.yudao.framework.common.util.date.DateUtils.TIME_ZONE_DEFAULT; 14 import static cn.iocoder.yudao.framework.common.util.date.DateUtils.TIME_ZONE_DEFAULT;
15 15
16 /** 16 /**
17 -* 秒杀活动 Base VO,提供给添加、修改、详细的子 VO 使用  
18 -* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成  
19 -*/ 17 + * 秒杀活动 Base VO,提供给添加、修改、详细的子 VO 使用
  18 + * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
  19 + */
20 @Data 20 @Data
21 public class SeckillActivityBaseVO { 21 public class SeckillActivityBaseVO {
22 22
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; @@ -11,7 +11,6 @@ import javax.validation.constraints.NotEmpty;
11 import javax.validation.constraints.NotNull; 11 import javax.validation.constraints.NotNull;
12 import java.util.List; 12 import java.util.List;
13 13
14 -// TODO halfninety:检查下所有的 VO,需要保证 example 都写了哈。  
15 @ApiModel("管理后台 - 秒杀活动创建 Request VO") 14 @ApiModel("管理后台 - 秒杀活动创建 Request VO")
16 @Data 15 @Data
17 @EqualsAndHashCode(callSuper = true) 16 @EqualsAndHashCode(callSuper = true)
@@ -21,11 +20,11 @@ public class SeckillActivityCreateReqVO extends SeckillActivityBaseVO { @@ -21,11 +20,11 @@ public class SeckillActivityCreateReqVO extends SeckillActivityBaseVO {
21 @ApiModelProperty(value = "备注", example = "限时秒杀活动") 20 @ApiModelProperty(value = "备注", example = "限时秒杀活动")
22 private String remark; 21 private String remark;
23 22
24 - @ApiModelProperty(value = "排序", required = true) 23 + @ApiModelProperty(value = "排序", required = true, example = "1")
25 @NotNull(message = "排序不能为空") 24 @NotNull(message = "排序不能为空")
26 private Integer sort; 25 private Integer sort;
27 26
28 - @ApiModelProperty(value = "秒杀时段id", required = true) 27 + @ApiModelProperty(value = "秒杀时段id", required = true, example = "1,3")
29 @NotEmpty(message = "参与场次不能为空") 28 @NotEmpty(message = "参与场次不能为空")
30 private List<Long> timeIds; 29 private List<Long> timeIds;
31 30
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; @@ -11,7 +11,7 @@ import java.util.List;
11 @Data 11 @Data
12 @EqualsAndHashCode(callSuper = true) 12 @EqualsAndHashCode(callSuper = true)
13 @ToString(callSuper = true) 13 @ToString(callSuper = true)
14 -public class SeckillActivityDetailRespVO extends SeckillActivityRespVO{ 14 +public class SeckillActivityDetailRespVO extends SeckillActivityRespVO {
15 15
16 /** 16 /**
17 * 商品列表 17 * 商品列表
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 { @@ -26,7 +26,7 @@ public class SeckillActivityPageReqVO extends PageParam {
26 @ApiModelProperty(value = "活动状态", example = "进行中") 26 @ApiModelProperty(value = "活动状态", example = "进行中")
27 private Integer status; 27 private Integer status;
28 28
29 - @ApiModelProperty(value = "秒杀时段id") 29 + @ApiModelProperty(value = "秒杀时段id", example = "1")
30 private Long timeId; 30 private Long timeId;
31 31
32 @ApiModelProperty(value = "创建时间") 32 @ApiModelProperty(value = "创建时间")
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; @@ -15,22 +15,22 @@ import java.util.List;
15 @ToString(callSuper = true) 15 @ToString(callSuper = true)
16 public class SeckillActivityRespVO extends SeckillActivityBaseVO { 16 public class SeckillActivityRespVO extends SeckillActivityBaseVO {
17 17
18 - @ApiModelProperty(value = "秒杀活动id", required = true, example = "1") 18 + @ApiModelProperty(value = "秒杀活动id", required = true, example = "1")
19 private Long id; 19 private Long id;
20 20
21 - @ApiModelProperty(value = "付款订单数", required = true) 21 + @ApiModelProperty(value = "付款订单数", required = true, example = "1")
22 private Integer orderCount; 22 private Integer orderCount;
23 23
24 - @ApiModelProperty(value = "付款人数", required = true) 24 + @ApiModelProperty(value = "付款人数", required = true, example = "1")
25 private Integer userCount; 25 private Integer userCount;
26 26
27 @ApiModelProperty(value = "创建时间", required = true) 27 @ApiModelProperty(value = "创建时间", required = true)
28 private LocalDateTime createTime; 28 private LocalDateTime createTime;
29 29
30 - @ApiModelProperty(value = "秒杀时段id", required = true) 30 + @ApiModelProperty(value = "秒杀时段id", required = true, example = "1,3")
31 private List<Long> timeIds; 31 private List<Long> timeIds;
32 32
33 - @ApiModelProperty(value = "排序", required = true) 33 + @ApiModelProperty(value = "排序", required = true, example = "1")
34 private Integer sort; 34 private Integer sort;
35 35
36 @ApiModelProperty(value = "备注", example = "限时秒杀活动") 36 @ApiModelProperty(value = "备注", example = "限时秒杀活动")
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 { @@ -24,11 +24,11 @@ public class SeckillActivityUpdateReqVO extends SeckillActivityBaseVO {
24 @ApiModelProperty(value = "备注", example = "限时秒杀活动") 24 @ApiModelProperty(value = "备注", example = "限时秒杀活动")
25 private String remark; 25 private String remark;
26 26
27 - @ApiModelProperty(value = "排序", required = true) 27 + @ApiModelProperty(value = "排序", required = true, example = "1")
28 @NotNull(message = "排序不能为空") 28 @NotNull(message = "排序不能为空")
29 private Integer sort; 29 private Integer sort;
30 30
31 - @ApiModelProperty(value = "秒杀时段id", required = true) 31 + @ApiModelProperty(value = "秒杀时段id", required = true, example = "1,3")
32 @NotEmpty(message = "秒杀时段id不能为空") 32 @NotEmpty(message = "秒杀时段id不能为空")
33 private List<Long> timeIds; 33 private List<Long> timeIds;
34 34
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/time/SeckillTimeBaseVO.java
1 package cn.iocoder.yudao.module.promotion.controller.admin.seckill.vo.time; 1 package cn.iocoder.yudao.module.promotion.controller.admin.seckill.vo.time;
2 2
3 -import lombok.*; 3 +import io.swagger.annotations.ApiModelProperty;
  4 +import lombok.Data;
4 5
  6 +import javax.validation.constraints.NotNull;
5 import java.time.LocalTime; 7 import java.time.LocalTime;
6 8
7 -import io.swagger.annotations.*;  
8 -import javax.validation.constraints.*;  
9 -  
10 /** 9 /**
11 -* 秒杀时段 Base VO,提供给添加、修改、详细的子 VO 使用  
12 -* 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成  
13 -*/ 10 + * 秒杀时段 Base VO,提供给添加、修改、详细的子 VO 使用
  11 + * 如果子 VO 存在差异的字段,请不要添加到这里,影响 Swagger 文档生成
  12 + */
14 @Data 13 @Data
15 public class SeckillTimeBaseVO { 14 public class SeckillTimeBaseVO {
16 15
17 - @ApiModelProperty(value = "秒杀时段名称", required = true) 16 + @ApiModelProperty(value = "秒杀时段名称", required = true, example = "上午场")
18 @NotNull(message = "秒杀时段名称不能为空") 17 @NotNull(message = "秒杀时段名称不能为空")
19 private String name; 18 private String name;
20 19
21 - @ApiModelProperty(value = "开始时间点", required = true) 20 + @ApiModelProperty(value = "开始时间点", required = true, example = "16:30:40")
22 @NotNull(message = "开始时间点不能为空") 21 @NotNull(message = "开始时间点不能为空")
23 private LocalTime startTime; 22 private LocalTime startTime;
24 23
25 - @ApiModelProperty(value = "结束时间点", required = true) 24 + @ApiModelProperty(value = "结束时间点", required = true, example = "16:30:40")
26 @NotNull(message = "结束时间点不能为空") 25 @NotNull(message = "结束时间点不能为空")
27 private LocalTime endTime; 26 private LocalTime endTime;
28 27
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; @@ -16,14 +16,14 @@ import java.time.LocalTime;
16 @ToString(callSuper = true) 16 @ToString(callSuper = true)
17 public class SeckillTimePageReqVO extends PageParam { 17 public class SeckillTimePageReqVO extends PageParam {
18 18
19 - @ApiModelProperty(value = "秒杀时段名称") 19 + @ApiModelProperty(value = "秒杀时段名称", example = "上午场")
20 private String name; 20 private String name;
21 21
22 - @ApiModelProperty(value = "开始时间点") 22 + @ApiModelProperty(value = "开始时间点", example = "16:30:40")
23 @DateTimeFormat(pattern = "HH:mm:ss") 23 @DateTimeFormat(pattern = "HH:mm:ss")
24 private LocalTime startTime; 24 private LocalTime startTime;
25 25
26 - @ApiModelProperty(value = "结束时间点") 26 + @ApiModelProperty(value = "结束时间点", example = "16:30:40")
27 @DateTimeFormat(pattern = "HH:mm:ss") 27 @DateTimeFormat(pattern = "HH:mm:ss")
28 private LocalTime endTime; 28 private LocalTime endTime;
29 29
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/time/SeckillTimeRespVO.java
1 package cn.iocoder.yudao.module.promotion.controller.admin.seckill.vo.time; 1 package cn.iocoder.yudao.module.promotion.controller.admin.seckill.vo.time;
2 2
3 -import lombok.*;  
4 -import java.util.*;  
5 -import io.swagger.annotations.*; 3 +import io.swagger.annotations.ApiModel;
  4 +import io.swagger.annotations.ApiModelProperty;
  5 +import lombok.Data;
  6 +import lombok.EqualsAndHashCode;
  7 +import lombok.ToString;
  8 +
  9 +import java.time.LocalDateTime;
6 10
7 @ApiModel("管理后台 - 秒杀时段 Response VO") 11 @ApiModel("管理后台 - 秒杀时段 Response VO")
8 @Data 12 @Data
@@ -10,13 +14,13 @@ import io.swagger.annotations.*; @@ -10,13 +14,13 @@ import io.swagger.annotations.*;
10 @ToString(callSuper = true) 14 @ToString(callSuper = true)
11 public class SeckillTimeRespVO extends SeckillTimeBaseVO { 15 public class SeckillTimeRespVO extends SeckillTimeBaseVO {
12 16
13 - @ApiModelProperty(value = "编号", required = true) 17 + @ApiModelProperty(value = "编号", required = true, example = "1")
14 private Long id; 18 private Long id;
15 19
16 - @ApiModelProperty(value = "秒杀活动数量", required = true) 20 + @ApiModelProperty(value = "秒杀活动数量", required = true, example = "1")
17 private Integer seckillActivityCount; 21 private Integer seckillActivityCount;
18 22
19 @ApiModelProperty(value = "创建时间", required = true) 23 @ApiModelProperty(value = "创建时间", required = true)
20 - private Date createTime; 24 + private LocalDateTime createTime;
21 25
22 } 26 }
yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/admin/seckill/vo/time/SeckillTimeSimpleRespVO.java deleted
1 -package cn.iocoder.yudao.module.promotion.controller.admin.seckill.vo.time;  
2 -  
3 -public class SeckillTimeSimpleRespVO {  
4 -}  
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; @@ -14,7 +14,7 @@ import javax.validation.constraints.NotNull;
14 @ToString(callSuper = true) 14 @ToString(callSuper = true)
15 public class SeckillTimeUpdateReqVO extends SeckillTimeBaseVO { 15 public class SeckillTimeUpdateReqVO extends SeckillTimeBaseVO {
16 16
17 - @ApiModelProperty(value = "编号", required = true) 17 + @ApiModelProperty(value = "编号", required = true, example = "1")
18 @NotNull(message = "编号不能为空") 18 @NotNull(message = "编号不能为空")
19 private Long id; 19 private Long id;
20 20