From 666925da6e5c64d1bea90ac23083c37b64ccfea5 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Wed, 21 Jun 2023 08:41:45 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9Amall=20vo=20@Schema=20required=20?= =?UTF-8?q?=3D=20true=20=3D>=20requiredMode=20=3D=20Schema.RequiredMode.RE?= =?UTF-8?q?QUIRED?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../brand/vo/ProductBrandSimpleRespVO.java | 5 ++- .../admin/spu/vo/ProductSpuDetailRespVO.java | 8 ++--- .../admin/spu/vo/ProductSpuPageReqVO.java | 3 +- .../spu/vo/ProductSpuUpdateStatusReqVO.java | 9 ++---- .../app/spu/vo/AppProductSpuPageRespVO.java | 20 ++++++------ .../comment/ProductCommentConvert.java | 1 + .../app/activity/vo/AppActivityRespVO.java | 11 ++++--- .../AppCombinationActivityDetailRespVO.java | 22 ++++++------- .../AppCombinationActivityRespVO.java | 17 ++++++---- .../AppCombinationRecordDetailRespVO.java | 7 ++-- .../vo/record/AppCombinationRecordRespVO.java | 22 ++++++------- .../AppCombinationRecordSummaryRespVO.java | 4 +-- .../vo/template/AppCouponTemplateRespVO.java | 17 +++++----- .../AppSeckillActivityDetailRespVO.java | 24 +++++++------- .../activity/AppSeckillActivityNowRespVO.java | 4 +-- .../vo/activity/AppSeckillActivityRespVO.java | 19 ++++++----- .../vo/config/AppSeckillConfigRespVO.java | 8 ++--- .../vo/express/DeliveryExpressBaseVO.java | 8 ++--- .../vo/express/DeliveryExpressRespVO.java | 9 ++++-- .../express/DeliveryExpressUpdateReqVO.java | 2 +- .../DeliveryExpressTemplateBaseVO.java | 6 ++-- .../DeliveryExpressTemplateRespVO.java | 9 ++++-- .../DeliveryExpressTemplateSimpleRespVO.java | 4 +-- .../DeliveryExpressTemplateUpdateReqVO.java | 2 +- .../vo/pickup/DeliveryPickUpStoreBaseVO.java | 20 ++++++------ .../vo/pickup/DeliveryPickUpStoreRespVO.java | 9 ++++-- .../DeliveryPickUpStoreUpdateReqVO.java | 10 +++--- .../vo/AppTradeAfterSaleCreateReqVO.java | 2 +- .../vo/AppTradeAfterSalePageItemRespVO.java | 32 +++++++++---------- .../app/cart/vo/AppTradeCartAddReqVO.java | 2 +- .../app/cart/vo/AppTradeCartListRespVO.java | 4 +-- .../app/cart/vo/AppTradeCartUpdateReqVO.java | 4 +-- .../service/order/TradeOrderServiceImpl.java | 24 ++------------ 33 files changed, 171 insertions(+), 177 deletions(-) diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/vo/ProductBrandSimpleRespVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/vo/ProductBrandSimpleRespVO.java index 14e74b946..6379a5fb1 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/vo/ProductBrandSimpleRespVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/brand/vo/ProductBrandSimpleRespVO.java @@ -5,17 +5,16 @@ import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; -// TODO @puhui999:class 类的开始和结束,都要有一个空行哈。 @Schema(description = "管理后台 - 品牌精简信息 Response VO") @Data @NoArgsConstructor @AllArgsConstructor public class ProductBrandSimpleRespVO { - @Schema(description = "品牌编号", required = true, example = "1024") + @Schema(description = "品牌编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") private Long id; - @Schema(description = "品牌名称", required = true, example = "苹果") + @Schema(description = "品牌名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "苹果") private String name; } diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuDetailRespVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuDetailRespVO.java index 0c63e43b1..eff229c9d 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuDetailRespVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuDetailRespVO.java @@ -20,16 +20,16 @@ import java.util.List; @ToString(callSuper = true) public class ProductSpuDetailRespVO extends ProductSpuBaseVO { - @Schema(description = "商品 SPU 编号", required = true, example = "1212") + @Schema(description = "商品 SPU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1212") private Long id; - @Schema(description = "商品销量", required = true, example = "10000") + @Schema(description = "商品销量", requiredMode = Schema.RequiredMode.REQUIRED, example = "10000") private Integer salesCount; - @Schema(description = "浏览量", required = true, example = "20000") + @Schema(description = "浏览量", requiredMode = Schema.RequiredMode.REQUIRED, example = "20000") private Integer browseCount; - @Schema(description = "商品状态", required = true, example = "1") + @Schema(description = "商品状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Integer status; // ========== SKU 相关字段 ========= diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuPageReqVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuPageReqVO.java index cff3bf17c..d428164dd 100755 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuPageReqVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuPageReqVO.java @@ -1,7 +1,6 @@ package cn.iocoder.yudao.module.product.controller.admin.spu.vo; import cn.iocoder.yudao.framework.common.pojo.PageParam; -import cn.iocoder.yudao.framework.common.validation.InEnum; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; @@ -51,7 +50,7 @@ public class ProductSpuPageReqVO extends PageParam { @Schema(description = "商品名称", example = "清凉小短袖") private String name; - @Schema(description = "前端请求的tab类型", required = true, example = "1") + @Schema(description = "前端请求的tab类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Integer tabType; @Schema(description = "商品分类编号", example = "1") diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuUpdateStatusReqVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuUpdateStatusReqVO.java index e5a52419e..57bda636c 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuUpdateStatusReqVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuUpdateStatusReqVO.java @@ -1,16 +1,11 @@ package cn.iocoder.yudao.module.product.controller.admin.spu.vo; import cn.iocoder.yudao.framework.common.validation.InEnum; -import cn.iocoder.yudao.module.product.controller.admin.sku.vo.ProductSkuCreateOrUpdateReqVO; import cn.iocoder.yudao.module.product.enums.spu.ProductSpuStatusEnum; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.ToString; -import javax.validation.Valid; import javax.validation.constraints.NotNull; -import java.util.List; /** * 商品 SPU Status 更新 Request VO @@ -21,11 +16,11 @@ import java.util.List; @Data public class ProductSpuUpdateStatusReqVO{ - @Schema(description = "商品编号", required = true, example = "1") + @Schema(description = "商品编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") @NotNull(message = "商品编号不能为空") private Long id; - @Schema(description = "商品状态", required = true, example = "1") + @Schema(description = "商品状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") @NotNull(message = "商品状态不能为空") @InEnum(ProductSpuStatusEnum.class) private Integer status; diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/spu/vo/AppProductSpuPageRespVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/spu/vo/AppProductSpuPageRespVO.java index 85658b0e7..f78155e17 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/spu/vo/AppProductSpuPageRespVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/spu/vo/AppProductSpuPageRespVO.java @@ -9,40 +9,40 @@ import java.util.List; @Data public class AppProductSpuPageRespVO { - @Schema(description = "商品 SPU 编号", required = true, example = "1") + @Schema(description = "商品 SPU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Long id; - @Schema(description = "商品名称", required = true, example = "芋道") + @Schema(description = "商品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道") private String name; - @Schema(description = "分类编号", required = true) + @Schema(description = "分类编号", requiredMode = Schema.RequiredMode.REQUIRED) private Long categoryId; - @Schema(description = "商品封面图", required = true) + @Schema(description = "商品封面图", requiredMode = Schema.RequiredMode.REQUIRED) private String picUrl; - @Schema(description = "商品轮播图", required = true) + @Schema(description = "商品轮播图", requiredMode = Schema.RequiredMode.REQUIRED) private List sliderPicUrls; // ========== SKU 相关字段 ========= - @Schema(description = "规格类型", required = true, example = "true") + @Schema(description = "规格类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "true") private Boolean specType; - @Schema(description = "商品价格,单位使用:分", required = true, example = "1024") + @Schema(description = "商品价格,单位使用:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") private Integer price; - @Schema(description = "库存", required = true, example = "666") + @Schema(description = "库存", requiredMode = Schema.RequiredMode.REQUIRED, example = "666") private Integer stock; // ========== 营销相关字段 ========= - @Schema(description = "活动排序数组", required = true, example = "1024") + @Schema(description = "活动排序数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") private List activityOrders; // ========== 统计相关字段 ========= - @Schema(description = "商品销量", required = true, example = "1024") + @Schema(description = "商品销量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") private Integer salesCount; } diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/convert/comment/ProductCommentConvert.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/convert/comment/ProductCommentConvert.java index d435d56c7..23a504f18 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/convert/comment/ProductCommentConvert.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/convert/comment/ProductCommentConvert.java @@ -82,4 +82,5 @@ public interface ProductCommentConvert { ProductCommentDO convert(ProductCommentCreateReqVO createReq); List convertList02(List list); + } diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/activity/vo/AppActivityRespVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/activity/vo/AppActivityRespVO.java index 064cc21a2..b168e17e8 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/activity/vo/AppActivityRespVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/activity/vo/AppActivityRespVO.java @@ -9,19 +9,20 @@ import java.time.LocalDateTime; @Data public class AppActivityRespVO { - @Schema(description = "活动编号", required = true, example = "1024") + @Schema(description = "活动编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") private Long id; - @Schema(description = "活动类型", required = true, example = "1") // 对应 PromotionTypeEnum 枚举 + @Schema(description = "活动类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + // 对应 PromotionTypeEnum 枚举 private Integer type; - @Schema(description = "活动名称", required = true, example = "618 大促") + @Schema(description = "活动名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "618 大促") private String name; - @Schema(description = "活动开始时间", required = true) + @Schema(description = "活动开始时间", requiredMode = Schema.RequiredMode.REQUIRED) private LocalDateTime startTime; - @Schema(description = "活动结束时间", required = true) + @Schema(description = "活动结束时间", requiredMode = Schema.RequiredMode.REQUIRED) private LocalDateTime endTime; } diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/combination/vo/activity/AppCombinationActivityDetailRespVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/combination/vo/activity/AppCombinationActivityDetailRespVO.java index 2e6d1a40a..e2996b89b 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/combination/vo/activity/AppCombinationActivityDetailRespVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/combination/vo/activity/AppCombinationActivityDetailRespVO.java @@ -10,28 +10,28 @@ import java.util.List; @Data public class AppCombinationActivityDetailRespVO { - @Schema(description = "拼团活动编号", required = true, example = "1024") + @Schema(description = "拼团活动编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") private Long id; - @Schema(description = "拼团活动名称", required = true, example = "618 大拼团") + @Schema(description = "拼团活动名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "618 大拼团") private String name; - @Schema(description = "活动状态", required = true, example = "1") + @Schema(description = "活动状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Integer status; - @Schema(description = "活动开始时间", required = true) + @Schema(description = "活动开始时间", requiredMode = Schema.RequiredMode.REQUIRED) private LocalDateTime startTime; - @Schema(description = "活动结束时间", required = true) + @Schema(description = "活动结束时间", requiredMode = Schema.RequiredMode.REQUIRED) private LocalDateTime endTime; - @Schema(description = "拼团人数", required = true, example = "3") + @Schema(description = "拼团人数", requiredMode = Schema.RequiredMode.REQUIRED, example = "3") private Integer userSize; - @Schema(description = "成功的拼团数量", required = true, example = "100") + @Schema(description = "成功的拼团数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "100") private Integer successCount; - @Schema(description = "商品 SPU 编号", required = true, example = "2048") + @Schema(description = "商品 SPU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048") private Long spuId; @Schema(description = "总共限购数量", example = "10") @@ -40,17 +40,17 @@ public class AppCombinationActivityDetailRespVO { @Schema(description = "单次限购数量", example = "5") private Integer singleLimitCount; - @Schema(description = "商品信息数组", required = true) + @Schema(description = "商品信息数组", requiredMode = Schema.RequiredMode.REQUIRED) private List products; @Schema(description = "商品信息") @Data public static class Product { - @Schema(description = "商品 SKU 编号", required = true, example = "4096") + @Schema(description = "商品 SKU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "4096") private Long skuId; - @Schema(description = "拼团金额,单位:分", required = true, example = "100") + @Schema(description = "拼团金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "100") private Integer combinationPrice; } diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/combination/vo/activity/AppCombinationActivityRespVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/combination/vo/activity/AppCombinationActivityRespVO.java index 1c3139a1e..b536e8abe 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/combination/vo/activity/AppCombinationActivityRespVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/combination/vo/activity/AppCombinationActivityRespVO.java @@ -7,25 +7,28 @@ import lombok.Data; @Data public class AppCombinationActivityRespVO { - @Schema(description = "拼团活动编号", required = true, example = "1024") + @Schema(description = "拼团活动编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") private Long id; - @Schema(description = "拼团活动名称", required = true, example = "618 大拼团") + @Schema(description = "拼团活动名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "618 大拼团") private String name; - @Schema(description = "拼团人数", required = true, example = "3") + @Schema(description = "拼团人数", requiredMode = Schema.RequiredMode.REQUIRED, example = "3") private Integer userSize; - @Schema(description = "商品 SPU 编号", required = true, example = "2048") + @Schema(description = "商品 SPU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048") private Long spuId; - @Schema(description = "商品图片", required = true, example = "4096") // 从 SPU 的 picUrl 读取 + @Schema(description = "商品图片", requiredMode = Schema.RequiredMode.REQUIRED, example = "4096") + // 从 SPU 的 picUrl 读取 private String picUrl; - @Schema(description = "商品市场价,单位:分", required = true, example = "50") // 从 SPU 的 marketPrice 读取 + @Schema(description = "商品市场价,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "50") + // 从 SPU 的 marketPrice 读取 private Integer marketPrice; - @Schema(description = "拼团金额,单位:分", required = true, example = "100") // 从拼团商品里取最低价 + @Schema(description = "拼团金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "100") + // 从拼团商品里取最低价 private Integer combinationPrice; } diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/combination/vo/record/AppCombinationRecordDetailRespVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/combination/vo/record/AppCombinationRecordDetailRespVO.java index dae83ea9c..07f989d7f 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/combination/vo/record/AppCombinationRecordDetailRespVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/combination/vo/record/AppCombinationRecordDetailRespVO.java @@ -9,13 +9,14 @@ import java.util.List; @Data public class AppCombinationRecordDetailRespVO { - @Schema(description = "团长的拼团记录", required = true) + @Schema(description = "团长的拼团记录", requiredMode = Schema.RequiredMode.REQUIRED) private AppCombinationRecordRespVO headRecord; - @Schema(description = "成员的拼团记录", required = true) + @Schema(description = "成员的拼团记录", requiredMode = Schema.RequiredMode.REQUIRED) private List memberRecords; - @Schema(description = "当前用户参团记录对应的订单编号", required = true, example = "1024") // 如果没参团,返回 null + @Schema(description = "当前用户参团记录对应的订单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") + // 如果没参团,返回 null private Long orderId; } diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/combination/vo/record/AppCombinationRecordRespVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/combination/vo/record/AppCombinationRecordRespVO.java index 143271b3b..1a3469769 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/combination/vo/record/AppCombinationRecordRespVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/combination/vo/record/AppCombinationRecordRespVO.java @@ -9,37 +9,37 @@ import java.util.Date; @Data public class AppCombinationRecordRespVO { - @Schema(description = "拼团记录编号", required = true, example = "1024") + @Schema(description = "拼团记录编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") private Long id; - @Schema(description = "拼团活动编号", required = true, example = "1024") + @Schema(description = "拼团活动编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") private Long activityId; - @Schema(description = "用户昵称", required = true, example = "1024") + @Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") private String nickname; - @Schema(description = "用户头像", required = true, example = "1024") + @Schema(description = "用户头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") private String avatar; - @Schema(description = "过期时间", required = true) + @Schema(description = "过期时间", requiredMode = Schema.RequiredMode.REQUIRED) private Date expireTime; - @Schema(description = "可参团人数", required = true, example = "10") + @Schema(description = "可参团人数", requiredMode = Schema.RequiredMode.REQUIRED, example = "10") private Integer userSize; - @Schema(description = "已参团人数", required = true, example = "5") + @Schema(description = "已参团人数", requiredMode = Schema.RequiredMode.REQUIRED, example = "5") private Integer userCount; - @Schema(description = "拼团状态", required = true, example = "1") + @Schema(description = "拼团状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Integer status; - @Schema(description = "商品名字", required = true, example = "我是大黄豆") + @Schema(description = "商品名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "我是大黄豆") private String spuName; - @Schema(description = "商品图片", required = true, example = "https://www.iocoder.cn/1.png") + @Schema(description = "商品图片", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/1.png") private String picUrl; - @Schema(description = "拼团金额,单位:分", required = true, example = "100") + @Schema(description = "拼团金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "100") private Integer combinationPrice; } diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/combination/vo/record/AppCombinationRecordSummaryRespVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/combination/vo/record/AppCombinationRecordSummaryRespVO.java index a071620a4..ef81e9282 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/combination/vo/record/AppCombinationRecordSummaryRespVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/combination/vo/record/AppCombinationRecordSummaryRespVO.java @@ -9,10 +9,10 @@ import java.util.List; @Data public class AppCombinationRecordSummaryRespVO { - @Schema(description = "拼团用户数量", required = true, example = "1024") + @Schema(description = "拼团用户数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") private Integer userCount; - @Schema(description = "拼团用户头像列表", required = true) // 只返回最近的 7 个 + @Schema(description = "拼团用户头像列表", requiredMode = Schema.RequiredMode.REQUIRED) // 只返回最近的 7 个 private List avatars; } diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/coupon/vo/template/AppCouponTemplateRespVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/coupon/vo/template/AppCouponTemplateRespVO.java index 5e8aa86ef..83410fd89 100755 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/coupon/vo/template/AppCouponTemplateRespVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/coupon/vo/template/AppCouponTemplateRespVO.java @@ -10,27 +10,28 @@ import java.time.LocalDateTime; @Data public class AppCouponTemplateRespVO { - @Schema(description = "优惠劵模板编号", required = true, example = "1") + @Schema(description = "优惠劵模板编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Long id; - @Schema(description = "优惠劵名", required = true, example = "春节送送送") + @Schema(description = "优惠劵名", requiredMode = Schema.RequiredMode.REQUIRED, example = "春节送送送") private String name; - @Schema(description = "每人限领个数", required = true, example = "66") // -1 - 则表示不限制 + @Schema(description = "每人限领个数", requiredMode = Schema.RequiredMode.REQUIRED, example = "66") // -1 - 则表示不限制 private Integer takeLimitCount; - @Schema(description = "是否设置满多少金额可用", required = true, example = "100") // 单位:分;0 - 不限制 + @Schema(description = "是否设置满多少金额可用", requiredMode = Schema.RequiredMode.REQUIRED, example = "100") + // 单位:分;0 - 不限制 private Integer usePrice; // TODO 芋艿:这两要改的 -// @Schema(description = "商品范围", required = true, example = "1") +// @Schema(description = "商品范围", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") // @InEnum(PromotionProductScopeEnum.class) // private Integer productScope; // // @Schema(description = "商品 SPU 编号的数组", example = "1,3") // private List productSpuIds; - @Schema(description = "生效日期类型", required = true, example = "1") + @Schema(description = "生效日期类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Integer validityType; @Schema(description = "固定日期 - 生效开始时间") @@ -47,7 +48,7 @@ public class AppCouponTemplateRespVO { @Min(value = 1L, message = "开始天数必须大于 1") private Integer fixedEndTerm; - @Schema(description = "优惠类型", required = true, example = "1") + @Schema(description = "优惠类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Integer discountType; @Schema(description = "折扣百分比", example = "80") // 例如说,80% 为 80 @@ -62,7 +63,7 @@ public class AppCouponTemplateRespVO { // ========== 用户相关字段 ========== - @Schema(description = "是否已领取", required = true, example = "true") + @Schema(description = "是否已领取", requiredMode = Schema.RequiredMode.REQUIRED, example = "true") private Boolean takeStatus; } diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/seckill/vo/activity/AppSeckillActivityDetailRespVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/seckill/vo/activity/AppSeckillActivityDetailRespVO.java index 3622bc923..46fa4fbbd 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/seckill/vo/activity/AppSeckillActivityDetailRespVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/seckill/vo/activity/AppSeckillActivityDetailRespVO.java @@ -10,24 +10,24 @@ import java.util.List; @Data public class AppSeckillActivityDetailRespVO { - @Schema(description = "秒杀活动编号", required = true, example = "1024") + @Schema(description = "秒杀活动编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") private Long id; - @Schema(description = "秒杀活动名称", required = true, example = "晚九点限时秒杀") + @Schema(description = "秒杀活动名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "晚九点限时秒杀") private String name; - @Schema(description = "活动状态", required = true, example = "1") + @Schema(description = "活动状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Integer status; // TODO @芋艿:开始时间、结束时间,要和场次结合起来;就是要算到当前场次,是几点哈; - @Schema(description = "活动开始时间", required = true) + @Schema(description = "活动开始时间", requiredMode = Schema.RequiredMode.REQUIRED) private LocalDateTime startTime; - @Schema(description = "活动结束时间", required = true) + @Schema(description = "活动结束时间", requiredMode = Schema.RequiredMode.REQUIRED) private LocalDateTime endTime; - @Schema(description = "商品 SPU 编号", required = true, example = "2048") + @Schema(description = "商品 SPU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048") private Long spuId; @Schema(description = "总共限购数量", example = "10") @@ -36,26 +36,26 @@ public class AppSeckillActivityDetailRespVO { @Schema(description = "单次限购数量", example = "5") private Integer singleLimitCount; - @Schema(description = "秒杀库存(剩余)", required = true, example = "50") + @Schema(description = "秒杀库存(剩余)", requiredMode = Schema.RequiredMode.REQUIRED, example = "50") private Integer stock; - @Schema(description = "秒杀库存(总计)", required = true, example = "100") + @Schema(description = "秒杀库存(总计)", requiredMode = Schema.RequiredMode.REQUIRED, example = "100") private Integer totalStock; - @Schema(description = "商品信息数组", required = true) + @Schema(description = "商品信息数组", requiredMode = Schema.RequiredMode.REQUIRED) private List products; @Schema(description = "商品信息") @Data public static class Product { - @Schema(description = "商品 SKU 编号", required = true, example = "4096") + @Schema(description = "商品 SKU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "4096") private Long skuId; - @Schema(description = "秒杀金额,单位:分", required = true, example = "100") + @Schema(description = "秒杀金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "100") private Integer seckillPrice; - @Schema(description = "秒杀限量库存", required = true, example = "50") + @Schema(description = "秒杀限量库存", requiredMode = Schema.RequiredMode.REQUIRED, example = "50") private Integer stock; } diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/seckill/vo/activity/AppSeckillActivityNowRespVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/seckill/vo/activity/AppSeckillActivityNowRespVO.java index 551e616d7..5dad12904 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/seckill/vo/activity/AppSeckillActivityNowRespVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/seckill/vo/activity/AppSeckillActivityNowRespVO.java @@ -10,10 +10,10 @@ import java.util.List; @Data public class AppSeckillActivityNowRespVO { - @Schema(description = "秒杀时间段", required = true) + @Schema(description = "秒杀时间段", requiredMode = Schema.RequiredMode.REQUIRED) private AppSeckillConfigRespVO config; - @Schema(description = "秒杀活动数组", required = true) + @Schema(description = "秒杀活动数组", requiredMode = Schema.RequiredMode.REQUIRED) private List activities; } diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/seckill/vo/activity/AppSeckillActivityRespVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/seckill/vo/activity/AppSeckillActivityRespVO.java index 92ec5ef17..2797f9a1b 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/seckill/vo/activity/AppSeckillActivityRespVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/seckill/vo/activity/AppSeckillActivityRespVO.java @@ -7,28 +7,31 @@ import lombok.Data; @Data public class AppSeckillActivityRespVO { - @Schema(description = "秒杀活动编号", required = true, example = "1024") + @Schema(description = "秒杀活动编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") private Long id; - @Schema(description = "秒杀活动名称", required = true, example = "晚九点限时秒杀") + @Schema(description = "秒杀活动名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "晚九点限时秒杀") private String name; - @Schema(description = "商品 SPU 编号", required = true, example = "2048") + @Schema(description = "商品 SPU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048") private Long spuId; - @Schema(description = "商品图片", required = true, example = "4096") // 从 SPU 的 picUrl 读取 + @Schema(description = "商品图片", requiredMode = Schema.RequiredMode.REQUIRED, example = "4096") + // 从 SPU 的 picUrl 读取 private String picUrl; @Schema(description = "单位名", requiredMode = Schema.RequiredMode.REQUIRED, example = "个") private String unitName; - @Schema(description = "商品市场价,单位:分", required = true, example = "50") // 从 SPU 的 marketPrice 读取 + @Schema(description = "商品市场价,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "50") + // 从 SPU 的 marketPrice 读取 private Integer marketPrice; - @Schema(description = "秒杀库存(剩余)", required = true, example = "100") + @Schema(description = "秒杀库存(剩余)", requiredMode = Schema.RequiredMode.REQUIRED, example = "100") private Integer stock; - @Schema(description = "秒杀库存(总共)", required = true, example = "200") + @Schema(description = "秒杀库存(总共)", requiredMode = Schema.RequiredMode.REQUIRED, example = "200") private Integer totalStock; - @Schema(description = "秒杀金额,单位:分", required = true, example = "100") // 从秒杀商品里取最低价 + @Schema(description = "秒杀金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "100") + // 从秒杀商品里取最低价 private Integer seckillPrice; } diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/seckill/vo/config/AppSeckillConfigRespVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/seckill/vo/config/AppSeckillConfigRespVO.java index b6eb4045e..c981f8429 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/seckill/vo/config/AppSeckillConfigRespVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/seckill/vo/config/AppSeckillConfigRespVO.java @@ -9,15 +9,15 @@ import java.util.List; @Data public class AppSeckillConfigRespVO { - @Schema(description = "秒杀时间段编号", required = true, example = "1024") + @Schema(description = "秒杀时间段编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") private Long id; - @Schema(description = "开始时间点", required = true, example = "09:00") + @Schema(description = "开始时间点", requiredMode = Schema.RequiredMode.REQUIRED, example = "09:00") private String startTime; - @Schema(description = "结束时间点", required = true, example = "09:59") + @Schema(description = "结束时间点", requiredMode = Schema.RequiredMode.REQUIRED, example = "09:59") private String endTime; - @Schema(description = "轮播图", required = true) + @Schema(description = "轮播图", requiredMode = Schema.RequiredMode.REQUIRED) private List sliderPicUrls; } diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/express/DeliveryExpressBaseVO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/express/DeliveryExpressBaseVO.java index b92faccdb..cc7b8bedd 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/express/DeliveryExpressBaseVO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/express/DeliveryExpressBaseVO.java @@ -12,22 +12,22 @@ import javax.validation.constraints.NotNull; @Data public class DeliveryExpressBaseVO { - @Schema(description = "快递公司编码", required = true) + @Schema(description = "快递公司编码", requiredMode = Schema.RequiredMode.REQUIRED) @NotNull(message = "快递公司编码不能为空") private String code; - @Schema(description = "快递公司名称", required = true, example = "李四") + @Schema(description = "快递公司名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") @NotNull(message = "快递公司名称不能为空") private String name; @Schema(description = "快递公司logo") private String logo; - @Schema(description = "排序", required = true) + @Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED) @NotNull(message = "排序不能为空") private Integer sort; - @Schema(description = "状态", required = true, example = "1") + @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") @NotNull(message = "状态不能为空") private Integer status; diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/express/DeliveryExpressRespVO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/express/DeliveryExpressRespVO.java index 34fd06a53..cc314d105 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/express/DeliveryExpressRespVO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/express/DeliveryExpressRespVO.java @@ -1,7 +1,10 @@ package cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.express; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + import java.time.LocalDateTime; @Schema(description = "管理后台 - 快递公司 Response VO") @@ -10,10 +13,10 @@ import java.time.LocalDateTime; @ToString(callSuper = true) public class DeliveryExpressRespVO extends DeliveryExpressBaseVO { - @Schema(description = "编号", required = true, example = "6592") + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "6592") private Long id; - @Schema(description = "创建时间", required = true) + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) private LocalDateTime createTime; } diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/express/DeliveryExpressUpdateReqVO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/express/DeliveryExpressUpdateReqVO.java index f8bf33f5c..e51366ded 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/express/DeliveryExpressUpdateReqVO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/express/DeliveryExpressUpdateReqVO.java @@ -13,7 +13,7 @@ import javax.validation.constraints.NotNull; @ToString(callSuper = true) public class DeliveryExpressUpdateReqVO extends DeliveryExpressBaseVO { - @Schema(description = "编号", required = true, example = "6592") + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "6592") @NotNull(message = "编号不能为空") private Long id; diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/expresstemplate/DeliveryExpressTemplateBaseVO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/expresstemplate/DeliveryExpressTemplateBaseVO.java index 7e84f962e..3be8ffc3b 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/expresstemplate/DeliveryExpressTemplateBaseVO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/expresstemplate/DeliveryExpressTemplateBaseVO.java @@ -12,15 +12,15 @@ import javax.validation.constraints.NotNull; @Data public class DeliveryExpressTemplateBaseVO { - @Schema(description = "模板名称", required = true, example = "王五") + @Schema(description = "模板名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") @NotNull(message = "模板名称不能为空") private String name; - @Schema(description = "配送计费方式 1:按件 2:按重量 3:按体积", required = true) + @Schema(description = "配送计费方式 1:按件 2:按重量 3:按体积", requiredMode = Schema.RequiredMode.REQUIRED) @NotNull(message = "配送计费方式 1:按件 2:按重量 3:按体积不能为空") private Integer chargeMode; - @Schema(description = "排序", required = true) + @Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED) @NotNull(message = "排序不能为空") private Integer sort; diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/expresstemplate/DeliveryExpressTemplateRespVO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/expresstemplate/DeliveryExpressTemplateRespVO.java index 222cab9fd..19a8c1621 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/expresstemplate/DeliveryExpressTemplateRespVO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/expresstemplate/DeliveryExpressTemplateRespVO.java @@ -1,7 +1,10 @@ package cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.expresstemplate; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + import java.time.LocalDateTime; @Schema(description = "管理后台 - 快递运费模板 Response VO") @@ -10,10 +13,10 @@ import java.time.LocalDateTime; @ToString(callSuper = true) public class DeliveryExpressTemplateRespVO extends DeliveryExpressTemplateBaseVO { - @Schema(description = "编号,自增", required = true, example = "371") + @Schema(description = "编号,自增", requiredMode = Schema.RequiredMode.REQUIRED, example = "371") private Long id; - @Schema(description = "创建时间", required = true) + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) private LocalDateTime createTime; } diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/expresstemplate/DeliveryExpressTemplateSimpleRespVO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/expresstemplate/DeliveryExpressTemplateSimpleRespVO.java index 37abbd06d..074cc5337 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/expresstemplate/DeliveryExpressTemplateSimpleRespVO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/expresstemplate/DeliveryExpressTemplateSimpleRespVO.java @@ -12,10 +12,10 @@ import lombok.NoArgsConstructor; @AllArgsConstructor public class DeliveryExpressTemplateSimpleRespVO { - @Schema(description = "模版编号", required = true, example = "1024") + @Schema(description = "模版编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") private Long id; - @Schema(description = "模板名称", required = true, example = "测试模版") + @Schema(description = "模板名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "测试模版") private String name; } diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/expresstemplate/DeliveryExpressTemplateUpdateReqVO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/expresstemplate/DeliveryExpressTemplateUpdateReqVO.java index d059e3200..b8b372271 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/expresstemplate/DeliveryExpressTemplateUpdateReqVO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/expresstemplate/DeliveryExpressTemplateUpdateReqVO.java @@ -15,7 +15,7 @@ import java.util.List; @ToString(callSuper = true) public class DeliveryExpressTemplateUpdateReqVO extends DeliveryExpressTemplateBaseVO { - @Schema(description = "编号", required = true, example = "371") + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "371") @NotNull(message = "编号不能为空") private Long id; diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/pickup/DeliveryPickUpStoreBaseVO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/pickup/DeliveryPickUpStoreBaseVO.java index 45c07177d..6a4ab1141 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/pickup/DeliveryPickUpStoreBaseVO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/pickup/DeliveryPickUpStoreBaseVO.java @@ -18,49 +18,49 @@ import java.time.LocalTime; @Data public class DeliveryPickUpStoreBaseVO { - @Schema(description = "门店名称", required = true, example = "李四") + @Schema(description = "门店名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") @NotBlank(message = "门店名称不能为空") private String name; @Schema(description = "门店简介", example = "我是门店简介") private String introduction; - @Schema(description = "门店手机", required = true, example = "15601892312") + @Schema(description = "门店手机", requiredMode = Schema.RequiredMode.REQUIRED, example = "15601892312") @NotBlank(message = "门店手机不能为空") @Mobile private String phone; - @Schema(description = "区域编号", required = true, example = "18733") + @Schema(description = "区域编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "18733") @NotNull(message = "区域编号不能为空") private Integer areaId; - @Schema(description = "门店详细地址", required = true, example = "复旦大学路 188 号") + @Schema(description = "门店详细地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "复旦大学路 188 号") @NotBlank(message = "门店详细地址不能为空") private String detailAddress; - @Schema(description = "门店 logo", required = true, example = "https://www.iocoder.cn/1.png") + @Schema(description = "门店 logo", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/1.png") @NotBlank(message = "门店 logo 不能为空") private String logo; - @Schema(description = "营业开始时间", required = true) + @Schema(description = "营业开始时间", requiredMode = Schema.RequiredMode.REQUIRED) @NotNull(message = "营业开始时间不能为空") @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "HH:mm") private LocalTime openingTime; - @Schema(description = "营业结束时间", required = true) + @Schema(description = "营业结束时间", requiredMode = Schema.RequiredMode.REQUIRED) @NotNull(message = "营业结束时间不能为空") @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "HH:mm") private LocalTime closingTime; - @Schema(description = "纬度", required = true, example = "5.88") + @Schema(description = "纬度", requiredMode = Schema.RequiredMode.REQUIRED, example = "5.88") @NotNull(message = "纬度不能为空") private Double latitude; - @Schema(description = "经度", required = true, example = "6.99") + @Schema(description = "经度", requiredMode = Schema.RequiredMode.REQUIRED, example = "6.99") @NotNull(message = "经度不能为空") private Double longitude; - @Schema(description = "门店状态", required = true, example = "1") + @Schema(description = "门店状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") @NotNull(message = "门店状态不能为空") @InEnum(CommonStatusEnum.class) private Integer status; diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/pickup/DeliveryPickUpStoreRespVO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/pickup/DeliveryPickUpStoreRespVO.java index db0ffc0e8..5b5bd0d0c 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/pickup/DeliveryPickUpStoreRespVO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/pickup/DeliveryPickUpStoreRespVO.java @@ -1,7 +1,10 @@ package cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.pickup; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + import java.time.LocalDateTime; @Schema(description = "管理后台 - 自提门店 Response VO") @@ -10,10 +13,10 @@ import java.time.LocalDateTime; @ToString(callSuper = true) public class DeliveryPickUpStoreRespVO extends DeliveryPickUpStoreBaseVO { - @Schema(description = "编号", required = true, example = "23128") + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "23128") private Long id; - @Schema(description = "创建时间", required = true) + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) private LocalDateTime createTime; } diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/pickup/DeliveryPickUpStoreUpdateReqVO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/pickup/DeliveryPickUpStoreUpdateReqVO.java index 21a750075..2b0548d9d 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/pickup/DeliveryPickUpStoreUpdateReqVO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/pickup/DeliveryPickUpStoreUpdateReqVO.java @@ -1,9 +1,11 @@ package cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.pickup; import io.swagger.v3.oas.annotations.media.Schema; -import lombok.*; -import java.util.*; -import javax.validation.constraints.*; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +import javax.validation.constraints.NotNull; @Schema(description = "管理后台 - 自提门店更新 Request VO") @Data @@ -11,7 +13,7 @@ import javax.validation.constraints.*; @ToString(callSuper = true) public class DeliveryPickUpStoreUpdateReqVO extends DeliveryPickUpStoreBaseVO { - @Schema(description = "编号", required = true, example = "23128") + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "23128") @NotNull(message = "编号不能为空") private Long id; diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/aftersale/vo/AppTradeAfterSaleCreateReqVO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/aftersale/vo/AppTradeAfterSaleCreateReqVO.java index f863db0d0..519c3785a 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/aftersale/vo/AppTradeAfterSaleCreateReqVO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/aftersale/vo/AppTradeAfterSaleCreateReqVO.java @@ -36,7 +36,7 @@ public class AppTradeAfterSaleCreateReqVO { /** * @see AfterSaleStatusEnum */ - @Schema(description = "操作类型", required = true, example = "1") + @Schema(description = "操作类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") @NotNull(message = "操作类型不能为空") private String operateType; diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/aftersale/vo/AppTradeAfterSalePageItemRespVO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/aftersale/vo/AppTradeAfterSalePageItemRespVO.java index 31cb2e231..6a21a9ea1 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/aftersale/vo/AppTradeAfterSalePageItemRespVO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/aftersale/vo/AppTradeAfterSalePageItemRespVO.java @@ -11,48 +11,48 @@ import java.util.List; @Data public class AppTradeAfterSalePageItemRespVO { - @Schema(description = "售后编号", required = true, example = "1024") + @Schema(description = "售后编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") private Long id; - @Schema(description = "售后流水号", required = true, example = "1146347329394184195") + @Schema(description = "售后流水号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1146347329394184195") private String no; - @Schema(description = "售后状态", required = true, example = "1") + @Schema(description = "售后状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Integer status; - @Schema(description = "售后方式", required = true, example = "1") + @Schema(description = "售后方式", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Integer way; - @Schema(description = "售后类型", required = true, example = "1") + @Schema(description = "售后类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Integer type; - @Schema(description = "申请原因", required = true, example = "1") + @Schema(description = "申请原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private String applyReason; - @Schema(description = "补充描述", required = true, example = "1") + @Schema(description = "补充描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private String applyDescription; - @Schema(description = "补充凭证图片", required = true, example = "1") + @Schema(description = "补充凭证图片", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private List applyPicUrls; // ========== 交易订单相关 ========== - @Schema(description = "交易订单编号", required = true, example = "1") + @Schema(description = "交易订单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Long orderId; - @Schema(description = "交易订单流水号", required = true, example = "1") + @Schema(description = "交易订单流水号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private String orderNo; - @Schema(description = "交易订单项编号", required = true, example = "1") + @Schema(description = "交易订单项编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Long orderItemId; - @Schema(description = "商品 SPU 编号", required = true, example = "1") + @Schema(description = "商品 SPU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Long spuId; - @Schema(description = "商品 SPU 名称", required = true, example = "1") + @Schema(description = "商品 SPU 名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private String spuName; - @Schema(description = "商品 SKU 编号", required = true, example = "1") + @Schema(description = "商品 SKU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Long skuId; /** @@ -60,10 +60,10 @@ public class AppTradeAfterSalePageItemRespVO { */ private List properties; - @Schema(description = "商品图片", required = true, example = "https://www.iocoder.cn/01.jpg") + @Schema(description = "商品图片", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/01.jpg") private String picUrl; - @Schema(description = "退货商品数量", required = true, example = "1") + @Schema(description = "退货商品数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Integer count; // ========== 审批相关 ========== diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppTradeCartAddReqVO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppTradeCartAddReqVO.java index f9521c5e2..8ea754849 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppTradeCartAddReqVO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppTradeCartAddReqVO.java @@ -17,7 +17,7 @@ public class AppTradeCartAddReqVO { @NotNull(message = "数量不能为空") private Integer count; - @Schema(description = "是否添加到购物车", required = true, example = "true") + @Schema(description = "是否添加到购物车", requiredMode = Schema.RequiredMode.REQUIRED, example = "true") @NotNull(message = "是否添加购物车不能为空") private Boolean addStatus; diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppTradeCartListRespVO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppTradeCartListRespVO.java index 5f33ece55..3f6dfe104 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppTradeCartListRespVO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppTradeCartListRespVO.java @@ -25,10 +25,10 @@ public class AppTradeCartListRespVO { @Data public static class Cart { - @Schema(description = "购物项的编号", required = true, example = "1024") + @Schema(description = "购物项的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") private Long id; - @Schema(description = "商品数量", required = true, example = "1") + @Schema(description = "商品数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") private Integer count; /** diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppTradeCartUpdateReqVO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppTradeCartUpdateReqVO.java index 4cf72bbf1..d0d2fff02 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppTradeCartUpdateReqVO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppTradeCartUpdateReqVO.java @@ -10,11 +10,11 @@ import javax.validation.constraints.NotNull; @Data public class AppTradeCartUpdateReqVO { - @Schema(description = "编号", required = true, example = "1024") + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") @NotNull(message = "编号不能为空") private Long id; - @Schema(description = "商品数量", required = true, example = "1") + @Schema(description = "商品数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") @NotNull(message = "数量不能为空") @Min(message = "数量必须大于 0", value = 1L) private Integer count; diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderServiceImpl.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderServiceImpl.java index 74056ed98..b324c8a21 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderServiceImpl.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/TradeOrderServiceImpl.java @@ -6,9 +6,7 @@ import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; import cn.iocoder.yudao.framework.common.core.KeyValue; -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; import cn.iocoder.yudao.framework.common.enums.TerminalEnum; -import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.framework.common.util.json.JsonUtils; import cn.iocoder.yudao.module.member.api.address.AddressApi; @@ -25,9 +23,7 @@ import cn.iocoder.yudao.module.promotion.api.coupon.CouponApi; import cn.iocoder.yudao.module.promotion.api.coupon.dto.CouponUseReqDTO; import cn.iocoder.yudao.module.system.api.notify.NotifyMessageSendApi; import cn.iocoder.yudao.module.system.api.notify.dto.NotifySendSingleToUserReqDTO; -import cn.iocoder.yudao.module.system.api.notify.dto.NotifyTemplateReqDTO; import cn.iocoder.yudao.module.system.api.user.AdminUserApi; -import cn.iocoder.yudao.module.system.enums.notify.NotifyTemplateTypeEnum; import cn.iocoder.yudao.module.trade.controller.admin.order.vo.TradeOrderDeliveryReqVO; import cn.iocoder.yudao.module.trade.controller.admin.order.vo.TradeOrderPageReqVO; import cn.iocoder.yudao.module.trade.controller.app.order.vo.AppTradeOrderCreateReqVO; @@ -357,28 +353,12 @@ public class TradeOrderServiceImpl implements TradeOrderService { // TODO 芋艿:发送订单变化的消息 // TODO 芋艿:发送站内信 fix - // TODO @puhui999:使用 sendSingleMessageToMember 呀;走模版;不用判断模版是否存在哈 - // 1、获取模版编码为 order_delivery 的模版,判断是否存在 存在放回 true - if (!notifyMessageSendApi.validateNotifyTemplate("order_delivery")) { - // 1、1 站内信模版不存在则创建模版 - NotifyTemplateReqDTO templateReqDTO = new NotifyTemplateReqDTO(); - templateReqDTO.setName("订单发货通知模版"); - templateReqDTO.setCode("order_delivery"); - templateReqDTO.setType(NotifyTemplateTypeEnum.NOTIFICATION_MESSAGE.getType()); // 系统消息 - // 获取操作用户 - // AdminUserRespDTO user = adminUserApi.getUser(userId); - // templateReqDTO.setNickname(user.getNickname()); - templateReqDTO.setNickname(UserTypeEnum.ADMIN.getName()); - templateReqDTO.setContent("订单:{orderId}{msg}"); - templateReqDTO.setStatus(CommonStatusEnum.ENABLE.getStatus()); - notifyMessageSendApi.createNotifyTemplate(templateReqDTO); - } - // 2、构造消息 + // 1、构造消息 Map msgMap = new HashMap<>(); msgMap.put("orderId", deliveryReqVO.getId()); msgMap.put("msg", TradeOrderStatusEnum.DELIVERED.getStatus()); // 2、发送站内信 - notifyMessageSendApi.sendSingleMessageToAdmin( + notifyMessageSendApi.sendSingleMessageToMember( new NotifySendSingleToUserReqDTO() .setUserId(userId) .setTemplateCode("order_delivery")