diff --git a/src/main/java/com/gxwebsoft/shop/dto/OrderCreateRequest.java b/src/main/java/com/gxwebsoft/shop/dto/OrderCreateRequest.java index 4d5164a..09b6807 100644 --- a/src/main/java/com/gxwebsoft/shop/dto/OrderCreateRequest.java +++ b/src/main/java/com/gxwebsoft/shop/dto/OrderCreateRequest.java @@ -6,6 +6,7 @@ import lombok.Data; import javax.validation.Valid; import javax.validation.constraints.*; import java.math.BigDecimal; +import java.time.LocalDateTime; import java.util.List; /** @@ -159,6 +160,9 @@ public class OrderCreateRequest { @Schema(description = "秒杀活动ID") private Integer activityId; + @Schema(description = "配送时间") + private LocalDateTime sendTime; + @Schema(description = "订单商品列表") @Valid @NotEmpty(message = "订单商品列表不能为空") @@ -173,14 +177,14 @@ public class OrderCreateRequest { @Schema(description = "秒杀活动ID") private Integer activityId; - @Schema(description = "商品ID", required = true) + @Schema(description = "商品ID") @NotNull(message = "商品ID不能为空") private Integer goodsId; @Schema(description = "商品SKU ID") private Integer skuId; - @Schema(description = "商品数量", required = true) + @Schema(description = "商品数量") @NotNull(message = "商品数量不能为空") @Min(value = 1, message = "商品数量必须大于0") private Integer quantity; diff --git a/src/main/java/com/gxwebsoft/shop/entity/ShopOrder.java b/src/main/java/com/gxwebsoft/shop/entity/ShopOrder.java index 5d95126..aa67f48 100644 --- a/src/main/java/com/gxwebsoft/shop/entity/ShopOrder.java +++ b/src/main/java/com/gxwebsoft/shop/entity/ShopOrder.java @@ -363,6 +363,9 @@ public class ShopOrder implements Serializable { @Schema(description = "配送费(步梯配送特有)") private BigDecimal deliveryFee; + @Schema(description = "配送时间") + private LocalDateTime sendTime; + @Schema(description = "修改时间") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime updateTime;