Commit 666925da6e5c64d1bea90ac23083c37b64ccfea5
1 parent
700d95a4
fix:mall vo @Schema required = true => requiredMode = Schema.RequiredMode.REQUIRED
Showing
33 changed files
with
171 additions
and
177 deletions
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; | @@ -5,17 +5,16 @@ import lombok.AllArgsConstructor; | ||
| 5 | import lombok.Data; | 5 | import lombok.Data; |
| 6 | import lombok.NoArgsConstructor; | 6 | import lombok.NoArgsConstructor; |
| 7 | 7 | ||
| 8 | -// TODO @puhui999:class 类的开始和结束,都要有一个空行哈。 | ||
| 9 | @Schema(description = "管理后台 - 品牌精简信息 Response VO") | 8 | @Schema(description = "管理后台 - 品牌精简信息 Response VO") |
| 10 | @Data | 9 | @Data |
| 11 | @NoArgsConstructor | 10 | @NoArgsConstructor |
| 12 | @AllArgsConstructor | 11 | @AllArgsConstructor |
| 13 | public class ProductBrandSimpleRespVO { | 12 | public class ProductBrandSimpleRespVO { |
| 14 | 13 | ||
| 15 | - @Schema(description = "品牌编号", required = true, example = "1024") | 14 | + @Schema(description = "品牌编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 16 | private Long id; | 15 | private Long id; |
| 17 | 16 | ||
| 18 | - @Schema(description = "品牌名称", required = true, example = "苹果") | 17 | + @Schema(description = "品牌名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "苹果") |
| 19 | private String name; | 18 | private String name; |
| 20 | 19 | ||
| 21 | } | 20 | } |
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; | @@ -20,16 +20,16 @@ import java.util.List; | ||
| 20 | @ToString(callSuper = true) | 20 | @ToString(callSuper = true) |
| 21 | public class ProductSpuDetailRespVO extends ProductSpuBaseVO { | 21 | public class ProductSpuDetailRespVO extends ProductSpuBaseVO { |
| 22 | 22 | ||
| 23 | - @Schema(description = "商品 SPU 编号", required = true, example = "1212") | 23 | + @Schema(description = "商品 SPU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1212") |
| 24 | private Long id; | 24 | private Long id; |
| 25 | 25 | ||
| 26 | - @Schema(description = "商品销量", required = true, example = "10000") | 26 | + @Schema(description = "商品销量", requiredMode = Schema.RequiredMode.REQUIRED, example = "10000") |
| 27 | private Integer salesCount; | 27 | private Integer salesCount; |
| 28 | 28 | ||
| 29 | - @Schema(description = "浏览量", required = true, example = "20000") | 29 | + @Schema(description = "浏览量", requiredMode = Schema.RequiredMode.REQUIRED, example = "20000") |
| 30 | private Integer browseCount; | 30 | private Integer browseCount; |
| 31 | 31 | ||
| 32 | - @Schema(description = "商品状态", required = true, example = "1") | 32 | + @Schema(description = "商品状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 33 | private Integer status; | 33 | private Integer status; |
| 34 | 34 | ||
| 35 | // ========== SKU 相关字段 ========= | 35 | // ========== SKU 相关字段 ========= |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuPageReqVO.java
| 1 | package cn.iocoder.yudao.module.product.controller.admin.spu.vo; | 1 | package cn.iocoder.yudao.module.product.controller.admin.spu.vo; |
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.common.pojo.PageParam; | 3 | import cn.iocoder.yudao.framework.common.pojo.PageParam; |
| 4 | -import cn.iocoder.yudao.framework.common.validation.InEnum; | ||
| 5 | import io.swagger.v3.oas.annotations.media.Schema; | 4 | import io.swagger.v3.oas.annotations.media.Schema; |
| 6 | import lombok.Data; | 5 | import lombok.Data; |
| 7 | import lombok.EqualsAndHashCode; | 6 | import lombok.EqualsAndHashCode; |
| @@ -51,7 +50,7 @@ public class ProductSpuPageReqVO extends PageParam { | @@ -51,7 +50,7 @@ public class ProductSpuPageReqVO extends PageParam { | ||
| 51 | @Schema(description = "商品名称", example = "清凉小短袖") | 50 | @Schema(description = "商品名称", example = "清凉小短袖") |
| 52 | private String name; | 51 | private String name; |
| 53 | 52 | ||
| 54 | - @Schema(description = "前端请求的tab类型", required = true, example = "1") | 53 | + @Schema(description = "前端请求的tab类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 55 | private Integer tabType; | 54 | private Integer tabType; |
| 56 | 55 | ||
| 57 | @Schema(description = "商品分类编号", example = "1") | 56 | @Schema(description = "商品分类编号", example = "1") |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/spu/vo/ProductSpuUpdateStatusReqVO.java
| 1 | package cn.iocoder.yudao.module.product.controller.admin.spu.vo; | 1 | package cn.iocoder.yudao.module.product.controller.admin.spu.vo; |
| 2 | 2 | ||
| 3 | import cn.iocoder.yudao.framework.common.validation.InEnum; | 3 | import cn.iocoder.yudao.framework.common.validation.InEnum; |
| 4 | -import cn.iocoder.yudao.module.product.controller.admin.sku.vo.ProductSkuCreateOrUpdateReqVO; | ||
| 5 | import cn.iocoder.yudao.module.product.enums.spu.ProductSpuStatusEnum; | 4 | import cn.iocoder.yudao.module.product.enums.spu.ProductSpuStatusEnum; |
| 6 | import io.swagger.v3.oas.annotations.media.Schema; | 5 | import io.swagger.v3.oas.annotations.media.Schema; |
| 7 | import lombok.Data; | 6 | import lombok.Data; |
| 8 | -import lombok.EqualsAndHashCode; | ||
| 9 | -import lombok.ToString; | ||
| 10 | 7 | ||
| 11 | -import javax.validation.Valid; | ||
| 12 | import javax.validation.constraints.NotNull; | 8 | import javax.validation.constraints.NotNull; |
| 13 | -import java.util.List; | ||
| 14 | 9 | ||
| 15 | /** | 10 | /** |
| 16 | * 商品 SPU Status 更新 Request VO | 11 | * 商品 SPU Status 更新 Request VO |
| @@ -21,11 +16,11 @@ import java.util.List; | @@ -21,11 +16,11 @@ import java.util.List; | ||
| 21 | @Data | 16 | @Data |
| 22 | public class ProductSpuUpdateStatusReqVO{ | 17 | public class ProductSpuUpdateStatusReqVO{ |
| 23 | 18 | ||
| 24 | - @Schema(description = "商品编号", required = true, example = "1") | 19 | + @Schema(description = "商品编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 25 | @NotNull(message = "商品编号不能为空") | 20 | @NotNull(message = "商品编号不能为空") |
| 26 | private Long id; | 21 | private Long id; |
| 27 | 22 | ||
| 28 | - @Schema(description = "商品状态", required = true, example = "1") | 23 | + @Schema(description = "商品状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 29 | @NotNull(message = "商品状态不能为空") | 24 | @NotNull(message = "商品状态不能为空") |
| 30 | @InEnum(ProductSpuStatusEnum.class) | 25 | @InEnum(ProductSpuStatusEnum.class) |
| 31 | private Integer status; | 26 | private Integer status; |
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; | @@ -9,40 +9,40 @@ import java.util.List; | ||
| 9 | @Data | 9 | @Data |
| 10 | public class AppProductSpuPageRespVO { | 10 | public class AppProductSpuPageRespVO { |
| 11 | 11 | ||
| 12 | - @Schema(description = "商品 SPU 编号", required = true, example = "1") | 12 | + @Schema(description = "商品 SPU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 13 | private Long id; | 13 | private Long id; |
| 14 | 14 | ||
| 15 | - @Schema(description = "商品名称", required = true, example = "芋道") | 15 | + @Schema(description = "商品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道") |
| 16 | private String name; | 16 | private String name; |
| 17 | 17 | ||
| 18 | - @Schema(description = "分类编号", required = true) | 18 | + @Schema(description = "分类编号", requiredMode = Schema.RequiredMode.REQUIRED) |
| 19 | private Long categoryId; | 19 | private Long categoryId; |
| 20 | 20 | ||
| 21 | - @Schema(description = "商品封面图", required = true) | 21 | + @Schema(description = "商品封面图", requiredMode = Schema.RequiredMode.REQUIRED) |
| 22 | private String picUrl; | 22 | private String picUrl; |
| 23 | 23 | ||
| 24 | - @Schema(description = "商品轮播图", required = true) | 24 | + @Schema(description = "商品轮播图", requiredMode = Schema.RequiredMode.REQUIRED) |
| 25 | private List<String> sliderPicUrls; | 25 | private List<String> sliderPicUrls; |
| 26 | 26 | ||
| 27 | // ========== SKU 相关字段 ========= | 27 | // ========== SKU 相关字段 ========= |
| 28 | 28 | ||
| 29 | - @Schema(description = "规格类型", required = true, example = "true") | 29 | + @Schema(description = "规格类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "true") |
| 30 | private Boolean specType; | 30 | private Boolean specType; |
| 31 | 31 | ||
| 32 | - @Schema(description = "商品价格,单位使用:分", required = true, example = "1024") | 32 | + @Schema(description = "商品价格,单位使用:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 33 | private Integer price; | 33 | private Integer price; |
| 34 | 34 | ||
| 35 | - @Schema(description = "库存", required = true, example = "666") | 35 | + @Schema(description = "库存", requiredMode = Schema.RequiredMode.REQUIRED, example = "666") |
| 36 | private Integer stock; | 36 | private Integer stock; |
| 37 | 37 | ||
| 38 | // ========== 营销相关字段 ========= | 38 | // ========== 营销相关字段 ========= |
| 39 | 39 | ||
| 40 | - @Schema(description = "活动排序数组", required = true, example = "1024") | 40 | + @Schema(description = "活动排序数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 41 | private List<Integer> activityOrders; | 41 | private List<Integer> activityOrders; |
| 42 | 42 | ||
| 43 | // ========== 统计相关字段 ========= | 43 | // ========== 统计相关字段 ========= |
| 44 | 44 | ||
| 45 | - @Schema(description = "商品销量", required = true, example = "1024") | 45 | + @Schema(description = "商品销量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 46 | private Integer salesCount; | 46 | private Integer salesCount; |
| 47 | 47 | ||
| 48 | } | 48 | } |
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 { | @@ -82,4 +82,5 @@ public interface ProductCommentConvert { | ||
| 82 | ProductCommentDO convert(ProductCommentCreateReqVO createReq); | 82 | ProductCommentDO convert(ProductCommentCreateReqVO createReq); |
| 83 | 83 | ||
| 84 | List<AppProductCommentRespVO> convertList02(List<ProductCommentDO> list); | 84 | List<AppProductCommentRespVO> convertList02(List<ProductCommentDO> list); |
| 85 | + | ||
| 85 | } | 86 | } |
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; | @@ -9,19 +9,20 @@ import java.time.LocalDateTime; | ||
| 9 | @Data | 9 | @Data |
| 10 | public class AppActivityRespVO { | 10 | public class AppActivityRespVO { |
| 11 | 11 | ||
| 12 | - @Schema(description = "活动编号", required = true, example = "1024") | 12 | + @Schema(description = "活动编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 13 | private Long id; | 13 | private Long id; |
| 14 | 14 | ||
| 15 | - @Schema(description = "活动类型", required = true, example = "1") // 对应 PromotionTypeEnum 枚举 | 15 | + @Schema(description = "活动类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 16 | + // 对应 PromotionTypeEnum 枚举 | ||
| 16 | private Integer type; | 17 | private Integer type; |
| 17 | 18 | ||
| 18 | - @Schema(description = "活动名称", required = true, example = "618 大促") | 19 | + @Schema(description = "活动名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "618 大促") |
| 19 | private String name; | 20 | private String name; |
| 20 | 21 | ||
| 21 | - @Schema(description = "活动开始时间", required = true) | 22 | + @Schema(description = "活动开始时间", requiredMode = Schema.RequiredMode.REQUIRED) |
| 22 | private LocalDateTime startTime; | 23 | private LocalDateTime startTime; |
| 23 | 24 | ||
| 24 | - @Schema(description = "活动结束时间", required = true) | 25 | + @Schema(description = "活动结束时间", requiredMode = Schema.RequiredMode.REQUIRED) |
| 25 | private LocalDateTime endTime; | 26 | private LocalDateTime endTime; |
| 26 | 27 | ||
| 27 | } | 28 | } |
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; | @@ -10,28 +10,28 @@ import java.util.List; | ||
| 10 | @Data | 10 | @Data |
| 11 | public class AppCombinationActivityDetailRespVO { | 11 | public class AppCombinationActivityDetailRespVO { |
| 12 | 12 | ||
| 13 | - @Schema(description = "拼团活动编号", required = true, example = "1024") | 13 | + @Schema(description = "拼团活动编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 14 | private Long id; | 14 | private Long id; |
| 15 | 15 | ||
| 16 | - @Schema(description = "拼团活动名称", required = true, example = "618 大拼团") | 16 | + @Schema(description = "拼团活动名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "618 大拼团") |
| 17 | private String name; | 17 | private String name; |
| 18 | 18 | ||
| 19 | - @Schema(description = "活动状态", required = true, example = "1") | 19 | + @Schema(description = "活动状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 20 | private Integer status; | 20 | private Integer status; |
| 21 | 21 | ||
| 22 | - @Schema(description = "活动开始时间", required = true) | 22 | + @Schema(description = "活动开始时间", requiredMode = Schema.RequiredMode.REQUIRED) |
| 23 | private LocalDateTime startTime; | 23 | private LocalDateTime startTime; |
| 24 | 24 | ||
| 25 | - @Schema(description = "活动结束时间", required = true) | 25 | + @Schema(description = "活动结束时间", requiredMode = Schema.RequiredMode.REQUIRED) |
| 26 | private LocalDateTime endTime; | 26 | private LocalDateTime endTime; |
| 27 | 27 | ||
| 28 | - @Schema(description = "拼团人数", required = true, example = "3") | 28 | + @Schema(description = "拼团人数", requiredMode = Schema.RequiredMode.REQUIRED, example = "3") |
| 29 | private Integer userSize; | 29 | private Integer userSize; |
| 30 | 30 | ||
| 31 | - @Schema(description = "成功的拼团数量", required = true, example = "100") | 31 | + @Schema(description = "成功的拼团数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "100") |
| 32 | private Integer successCount; | 32 | private Integer successCount; |
| 33 | 33 | ||
| 34 | - @Schema(description = "商品 SPU 编号", required = true, example = "2048") | 34 | + @Schema(description = "商品 SPU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048") |
| 35 | private Long spuId; | 35 | private Long spuId; |
| 36 | 36 | ||
| 37 | @Schema(description = "总共限购数量", example = "10") | 37 | @Schema(description = "总共限购数量", example = "10") |
| @@ -40,17 +40,17 @@ public class AppCombinationActivityDetailRespVO { | @@ -40,17 +40,17 @@ public class AppCombinationActivityDetailRespVO { | ||
| 40 | @Schema(description = "单次限购数量", example = "5") | 40 | @Schema(description = "单次限购数量", example = "5") |
| 41 | private Integer singleLimitCount; | 41 | private Integer singleLimitCount; |
| 42 | 42 | ||
| 43 | - @Schema(description = "商品信息数组", required = true) | 43 | + @Schema(description = "商品信息数组", requiredMode = Schema.RequiredMode.REQUIRED) |
| 44 | private List<Product> products; | 44 | private List<Product> products; |
| 45 | 45 | ||
| 46 | @Schema(description = "商品信息") | 46 | @Schema(description = "商品信息") |
| 47 | @Data | 47 | @Data |
| 48 | public static class Product { | 48 | public static class Product { |
| 49 | 49 | ||
| 50 | - @Schema(description = "商品 SKU 编号", required = true, example = "4096") | 50 | + @Schema(description = "商品 SKU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "4096") |
| 51 | private Long skuId; | 51 | private Long skuId; |
| 52 | 52 | ||
| 53 | - @Schema(description = "拼团金额,单位:分", required = true, example = "100") | 53 | + @Schema(description = "拼团金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "100") |
| 54 | private Integer combinationPrice; | 54 | private Integer combinationPrice; |
| 55 | 55 | ||
| 56 | } | 56 | } |
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; | @@ -7,25 +7,28 @@ import lombok.Data; | ||
| 7 | @Data | 7 | @Data |
| 8 | public class AppCombinationActivityRespVO { | 8 | public class AppCombinationActivityRespVO { |
| 9 | 9 | ||
| 10 | - @Schema(description = "拼团活动编号", required = true, example = "1024") | 10 | + @Schema(description = "拼团活动编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 11 | private Long id; | 11 | private Long id; |
| 12 | 12 | ||
| 13 | - @Schema(description = "拼团活动名称", required = true, example = "618 大拼团") | 13 | + @Schema(description = "拼团活动名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "618 大拼团") |
| 14 | private String name; | 14 | private String name; |
| 15 | 15 | ||
| 16 | - @Schema(description = "拼团人数", required = true, example = "3") | 16 | + @Schema(description = "拼团人数", requiredMode = Schema.RequiredMode.REQUIRED, example = "3") |
| 17 | private Integer userSize; | 17 | private Integer userSize; |
| 18 | 18 | ||
| 19 | - @Schema(description = "商品 SPU 编号", required = true, example = "2048") | 19 | + @Schema(description = "商品 SPU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048") |
| 20 | private Long spuId; | 20 | private Long spuId; |
| 21 | 21 | ||
| 22 | - @Schema(description = "商品图片", required = true, example = "4096") // 从 SPU 的 picUrl 读取 | 22 | + @Schema(description = "商品图片", requiredMode = Schema.RequiredMode.REQUIRED, example = "4096") |
| 23 | + // 从 SPU 的 picUrl 读取 | ||
| 23 | private String picUrl; | 24 | private String picUrl; |
| 24 | 25 | ||
| 25 | - @Schema(description = "商品市场价,单位:分", required = true, example = "50") // 从 SPU 的 marketPrice 读取 | 26 | + @Schema(description = "商品市场价,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "50") |
| 27 | + // 从 SPU 的 marketPrice 读取 | ||
| 26 | private Integer marketPrice; | 28 | private Integer marketPrice; |
| 27 | 29 | ||
| 28 | - @Schema(description = "拼团金额,单位:分", required = true, example = "100") // 从拼团商品里取最低价 | 30 | + @Schema(description = "拼团金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "100") |
| 31 | + // 从拼团商品里取最低价 | ||
| 29 | private Integer combinationPrice; | 32 | private Integer combinationPrice; |
| 30 | 33 | ||
| 31 | } | 34 | } |
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; | @@ -9,13 +9,14 @@ import java.util.List; | ||
| 9 | @Data | 9 | @Data |
| 10 | public class AppCombinationRecordDetailRespVO { | 10 | public class AppCombinationRecordDetailRespVO { |
| 11 | 11 | ||
| 12 | - @Schema(description = "团长的拼团记录", required = true) | 12 | + @Schema(description = "团长的拼团记录", requiredMode = Schema.RequiredMode.REQUIRED) |
| 13 | private AppCombinationRecordRespVO headRecord; | 13 | private AppCombinationRecordRespVO headRecord; |
| 14 | 14 | ||
| 15 | - @Schema(description = "成员的拼团记录", required = true) | 15 | + @Schema(description = "成员的拼团记录", requiredMode = Schema.RequiredMode.REQUIRED) |
| 16 | private List<AppCombinationRecordRespVO> memberRecords; | 16 | private List<AppCombinationRecordRespVO> memberRecords; |
| 17 | 17 | ||
| 18 | - @Schema(description = "当前用户参团记录对应的订单编号", required = true, example = "1024") // 如果没参团,返回 null | 18 | + @Schema(description = "当前用户参团记录对应的订单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 19 | + // 如果没参团,返回 null | ||
| 19 | private Long orderId; | 20 | private Long orderId; |
| 20 | 21 | ||
| 21 | } | 22 | } |
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; | @@ -9,37 +9,37 @@ import java.util.Date; | ||
| 9 | @Data | 9 | @Data |
| 10 | public class AppCombinationRecordRespVO { | 10 | public class AppCombinationRecordRespVO { |
| 11 | 11 | ||
| 12 | - @Schema(description = "拼团记录编号", required = true, example = "1024") | 12 | + @Schema(description = "拼团记录编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 13 | private Long id; | 13 | private Long id; |
| 14 | 14 | ||
| 15 | - @Schema(description = "拼团活动编号", required = true, example = "1024") | 15 | + @Schema(description = "拼团活动编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 16 | private Long activityId; | 16 | private Long activityId; |
| 17 | 17 | ||
| 18 | - @Schema(description = "用户昵称", required = true, example = "1024") | 18 | + @Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 19 | private String nickname; | 19 | private String nickname; |
| 20 | 20 | ||
| 21 | - @Schema(description = "用户头像", required = true, example = "1024") | 21 | + @Schema(description = "用户头像", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 22 | private String avatar; | 22 | private String avatar; |
| 23 | 23 | ||
| 24 | - @Schema(description = "过期时间", required = true) | 24 | + @Schema(description = "过期时间", requiredMode = Schema.RequiredMode.REQUIRED) |
| 25 | private Date expireTime; | 25 | private Date expireTime; |
| 26 | 26 | ||
| 27 | - @Schema(description = "可参团人数", required = true, example = "10") | 27 | + @Schema(description = "可参团人数", requiredMode = Schema.RequiredMode.REQUIRED, example = "10") |
| 28 | private Integer userSize; | 28 | private Integer userSize; |
| 29 | 29 | ||
| 30 | - @Schema(description = "已参团人数", required = true, example = "5") | 30 | + @Schema(description = "已参团人数", requiredMode = Schema.RequiredMode.REQUIRED, example = "5") |
| 31 | private Integer userCount; | 31 | private Integer userCount; |
| 32 | 32 | ||
| 33 | - @Schema(description = "拼团状态", required = true, example = "1") | 33 | + @Schema(description = "拼团状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 34 | private Integer status; | 34 | private Integer status; |
| 35 | 35 | ||
| 36 | - @Schema(description = "商品名字", required = true, example = "我是大黄豆") | 36 | + @Schema(description = "商品名字", requiredMode = Schema.RequiredMode.REQUIRED, example = "我是大黄豆") |
| 37 | private String spuName; | 37 | private String spuName; |
| 38 | 38 | ||
| 39 | - @Schema(description = "商品图片", required = true, example = "https://www.iocoder.cn/1.png") | 39 | + @Schema(description = "商品图片", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/1.png") |
| 40 | private String picUrl; | 40 | private String picUrl; |
| 41 | 41 | ||
| 42 | - @Schema(description = "拼团金额,单位:分", required = true, example = "100") | 42 | + @Schema(description = "拼团金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "100") |
| 43 | private Integer combinationPrice; | 43 | private Integer combinationPrice; |
| 44 | 44 | ||
| 45 | } | 45 | } |
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; | @@ -9,10 +9,10 @@ import java.util.List; | ||
| 9 | @Data | 9 | @Data |
| 10 | public class AppCombinationRecordSummaryRespVO { | 10 | public class AppCombinationRecordSummaryRespVO { |
| 11 | 11 | ||
| 12 | - @Schema(description = "拼团用户数量", required = true, example = "1024") | 12 | + @Schema(description = "拼团用户数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 13 | private Integer userCount; | 13 | private Integer userCount; |
| 14 | 14 | ||
| 15 | - @Schema(description = "拼团用户头像列表", required = true) // 只返回最近的 7 个 | 15 | + @Schema(description = "拼团用户头像列表", requiredMode = Schema.RequiredMode.REQUIRED) // 只返回最近的 7 个 |
| 16 | private List<String> avatars; | 16 | private List<String> avatars; |
| 17 | 17 | ||
| 18 | } | 18 | } |
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; | @@ -10,27 +10,28 @@ import java.time.LocalDateTime; | ||
| 10 | @Data | 10 | @Data |
| 11 | public class AppCouponTemplateRespVO { | 11 | public class AppCouponTemplateRespVO { |
| 12 | 12 | ||
| 13 | - @Schema(description = "优惠劵模板编号", required = true, example = "1") | 13 | + @Schema(description = "优惠劵模板编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 14 | private Long id; | 14 | private Long id; |
| 15 | 15 | ||
| 16 | - @Schema(description = "优惠劵名", required = true, example = "春节送送送") | 16 | + @Schema(description = "优惠劵名", requiredMode = Schema.RequiredMode.REQUIRED, example = "春节送送送") |
| 17 | private String name; | 17 | private String name; |
| 18 | 18 | ||
| 19 | - @Schema(description = "每人限领个数", required = true, example = "66") // -1 - 则表示不限制 | 19 | + @Schema(description = "每人限领个数", requiredMode = Schema.RequiredMode.REQUIRED, example = "66") // -1 - 则表示不限制 |
| 20 | private Integer takeLimitCount; | 20 | private Integer takeLimitCount; |
| 21 | 21 | ||
| 22 | - @Schema(description = "是否设置满多少金额可用", required = true, example = "100") // 单位:分;0 - 不限制 | 22 | + @Schema(description = "是否设置满多少金额可用", requiredMode = Schema.RequiredMode.REQUIRED, example = "100") |
| 23 | + // 单位:分;0 - 不限制 | ||
| 23 | private Integer usePrice; | 24 | private Integer usePrice; |
| 24 | 25 | ||
| 25 | // TODO 芋艿:这两要改的 | 26 | // TODO 芋艿:这两要改的 |
| 26 | -// @Schema(description = "商品范围", required = true, example = "1") | 27 | +// @Schema(description = "商品范围", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 27 | // @InEnum(PromotionProductScopeEnum.class) | 28 | // @InEnum(PromotionProductScopeEnum.class) |
| 28 | // private Integer productScope; | 29 | // private Integer productScope; |
| 29 | // | 30 | // |
| 30 | // @Schema(description = "商品 SPU 编号的数组", example = "1,3") | 31 | // @Schema(description = "商品 SPU 编号的数组", example = "1,3") |
| 31 | // private List<Long> productSpuIds; | 32 | // private List<Long> productSpuIds; |
| 32 | 33 | ||
| 33 | - @Schema(description = "生效日期类型", required = true, example = "1") | 34 | + @Schema(description = "生效日期类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 34 | private Integer validityType; | 35 | private Integer validityType; |
| 35 | 36 | ||
| 36 | @Schema(description = "固定日期 - 生效开始时间") | 37 | @Schema(description = "固定日期 - 生效开始时间") |
| @@ -47,7 +48,7 @@ public class AppCouponTemplateRespVO { | @@ -47,7 +48,7 @@ public class AppCouponTemplateRespVO { | ||
| 47 | @Min(value = 1L, message = "开始天数必须大于 1") | 48 | @Min(value = 1L, message = "开始天数必须大于 1") |
| 48 | private Integer fixedEndTerm; | 49 | private Integer fixedEndTerm; |
| 49 | 50 | ||
| 50 | - @Schema(description = "优惠类型", required = true, example = "1") | 51 | + @Schema(description = "优惠类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 51 | private Integer discountType; | 52 | private Integer discountType; |
| 52 | 53 | ||
| 53 | @Schema(description = "折扣百分比", example = "80") // 例如说,80% 为 80 | 54 | @Schema(description = "折扣百分比", example = "80") // 例如说,80% 为 80 |
| @@ -62,7 +63,7 @@ public class AppCouponTemplateRespVO { | @@ -62,7 +63,7 @@ public class AppCouponTemplateRespVO { | ||
| 62 | 63 | ||
| 63 | // ========== 用户相关字段 ========== | 64 | // ========== 用户相关字段 ========== |
| 64 | 65 | ||
| 65 | - @Schema(description = "是否已领取", required = true, example = "true") | 66 | + @Schema(description = "是否已领取", requiredMode = Schema.RequiredMode.REQUIRED, example = "true") |
| 66 | private Boolean takeStatus; | 67 | private Boolean takeStatus; |
| 67 | 68 | ||
| 68 | } | 69 | } |
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; | @@ -10,24 +10,24 @@ import java.util.List; | ||
| 10 | @Data | 10 | @Data |
| 11 | public class AppSeckillActivityDetailRespVO { | 11 | public class AppSeckillActivityDetailRespVO { |
| 12 | 12 | ||
| 13 | - @Schema(description = "秒杀活动编号", required = true, example = "1024") | 13 | + @Schema(description = "秒杀活动编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 14 | private Long id; | 14 | private Long id; |
| 15 | 15 | ||
| 16 | - @Schema(description = "秒杀活动名称", required = true, example = "晚九点限时秒杀") | 16 | + @Schema(description = "秒杀活动名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "晚九点限时秒杀") |
| 17 | private String name; | 17 | private String name; |
| 18 | 18 | ||
| 19 | - @Schema(description = "活动状态", required = true, example = "1") | 19 | + @Schema(description = "活动状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 20 | private Integer status; | 20 | private Integer status; |
| 21 | 21 | ||
| 22 | // TODO @芋艿:开始时间、结束时间,要和场次结合起来;就是要算到当前场次,是几点哈; | 22 | // TODO @芋艿:开始时间、结束时间,要和场次结合起来;就是要算到当前场次,是几点哈; |
| 23 | 23 | ||
| 24 | - @Schema(description = "活动开始时间", required = true) | 24 | + @Schema(description = "活动开始时间", requiredMode = Schema.RequiredMode.REQUIRED) |
| 25 | private LocalDateTime startTime; | 25 | private LocalDateTime startTime; |
| 26 | 26 | ||
| 27 | - @Schema(description = "活动结束时间", required = true) | 27 | + @Schema(description = "活动结束时间", requiredMode = Schema.RequiredMode.REQUIRED) |
| 28 | private LocalDateTime endTime; | 28 | private LocalDateTime endTime; |
| 29 | 29 | ||
| 30 | - @Schema(description = "商品 SPU 编号", required = true, example = "2048") | 30 | + @Schema(description = "商品 SPU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048") |
| 31 | private Long spuId; | 31 | private Long spuId; |
| 32 | 32 | ||
| 33 | @Schema(description = "总共限购数量", example = "10") | 33 | @Schema(description = "总共限购数量", example = "10") |
| @@ -36,26 +36,26 @@ public class AppSeckillActivityDetailRespVO { | @@ -36,26 +36,26 @@ public class AppSeckillActivityDetailRespVO { | ||
| 36 | @Schema(description = "单次限购数量", example = "5") | 36 | @Schema(description = "单次限购数量", example = "5") |
| 37 | private Integer singleLimitCount; | 37 | private Integer singleLimitCount; |
| 38 | 38 | ||
| 39 | - @Schema(description = "秒杀库存(剩余)", required = true, example = "50") | 39 | + @Schema(description = "秒杀库存(剩余)", requiredMode = Schema.RequiredMode.REQUIRED, example = "50") |
| 40 | private Integer stock; | 40 | private Integer stock; |
| 41 | 41 | ||
| 42 | - @Schema(description = "秒杀库存(总计)", required = true, example = "100") | 42 | + @Schema(description = "秒杀库存(总计)", requiredMode = Schema.RequiredMode.REQUIRED, example = "100") |
| 43 | private Integer totalStock; | 43 | private Integer totalStock; |
| 44 | 44 | ||
| 45 | - @Schema(description = "商品信息数组", required = true) | 45 | + @Schema(description = "商品信息数组", requiredMode = Schema.RequiredMode.REQUIRED) |
| 46 | private List<Product> products; | 46 | private List<Product> products; |
| 47 | 47 | ||
| 48 | @Schema(description = "商品信息") | 48 | @Schema(description = "商品信息") |
| 49 | @Data | 49 | @Data |
| 50 | public static class Product { | 50 | public static class Product { |
| 51 | 51 | ||
| 52 | - @Schema(description = "商品 SKU 编号", required = true, example = "4096") | 52 | + @Schema(description = "商品 SKU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "4096") |
| 53 | private Long skuId; | 53 | private Long skuId; |
| 54 | 54 | ||
| 55 | - @Schema(description = "秒杀金额,单位:分", required = true, example = "100") | 55 | + @Schema(description = "秒杀金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "100") |
| 56 | private Integer seckillPrice; | 56 | private Integer seckillPrice; |
| 57 | 57 | ||
| 58 | - @Schema(description = "秒杀限量库存", required = true, example = "50") | 58 | + @Schema(description = "秒杀限量库存", requiredMode = Schema.RequiredMode.REQUIRED, example = "50") |
| 59 | private Integer stock; | 59 | private Integer stock; |
| 60 | 60 | ||
| 61 | } | 61 | } |
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; | @@ -10,10 +10,10 @@ import java.util.List; | ||
| 10 | @Data | 10 | @Data |
| 11 | public class AppSeckillActivityNowRespVO { | 11 | public class AppSeckillActivityNowRespVO { |
| 12 | 12 | ||
| 13 | - @Schema(description = "秒杀时间段", required = true) | 13 | + @Schema(description = "秒杀时间段", requiredMode = Schema.RequiredMode.REQUIRED) |
| 14 | private AppSeckillConfigRespVO config; | 14 | private AppSeckillConfigRespVO config; |
| 15 | 15 | ||
| 16 | - @Schema(description = "秒杀活动数组", required = true) | 16 | + @Schema(description = "秒杀活动数组", requiredMode = Schema.RequiredMode.REQUIRED) |
| 17 | private List<AppSeckillActivityRespVO> activities; | 17 | private List<AppSeckillActivityRespVO> activities; |
| 18 | 18 | ||
| 19 | } | 19 | } |
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; | @@ -7,28 +7,31 @@ import lombok.Data; | ||
| 7 | @Data | 7 | @Data |
| 8 | public class AppSeckillActivityRespVO { | 8 | public class AppSeckillActivityRespVO { |
| 9 | 9 | ||
| 10 | - @Schema(description = "秒杀活动编号", required = true, example = "1024") | 10 | + @Schema(description = "秒杀活动编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 11 | private Long id; | 11 | private Long id; |
| 12 | 12 | ||
| 13 | - @Schema(description = "秒杀活动名称", required = true, example = "晚九点限时秒杀") | 13 | + @Schema(description = "秒杀活动名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "晚九点限时秒杀") |
| 14 | private String name; | 14 | private String name; |
| 15 | 15 | ||
| 16 | - @Schema(description = "商品 SPU 编号", required = true, example = "2048") | 16 | + @Schema(description = "商品 SPU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "2048") |
| 17 | private Long spuId; | 17 | private Long spuId; |
| 18 | 18 | ||
| 19 | - @Schema(description = "商品图片", required = true, example = "4096") // 从 SPU 的 picUrl 读取 | 19 | + @Schema(description = "商品图片", requiredMode = Schema.RequiredMode.REQUIRED, example = "4096") |
| 20 | + // 从 SPU 的 picUrl 读取 | ||
| 20 | private String picUrl; | 21 | private String picUrl; |
| 21 | @Schema(description = "单位名", requiredMode = Schema.RequiredMode.REQUIRED, example = "个") | 22 | @Schema(description = "单位名", requiredMode = Schema.RequiredMode.REQUIRED, example = "个") |
| 22 | private String unitName; | 23 | private String unitName; |
| 23 | - @Schema(description = "商品市场价,单位:分", required = true, example = "50") // 从 SPU 的 marketPrice 读取 | 24 | + @Schema(description = "商品市场价,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "50") |
| 25 | + // 从 SPU 的 marketPrice 读取 | ||
| 24 | private Integer marketPrice; | 26 | private Integer marketPrice; |
| 25 | 27 | ||
| 26 | - @Schema(description = "秒杀库存(剩余)", required = true, example = "100") | 28 | + @Schema(description = "秒杀库存(剩余)", requiredMode = Schema.RequiredMode.REQUIRED, example = "100") |
| 27 | private Integer stock; | 29 | private Integer stock; |
| 28 | - @Schema(description = "秒杀库存(总共)", required = true, example = "200") | 30 | + @Schema(description = "秒杀库存(总共)", requiredMode = Schema.RequiredMode.REQUIRED, example = "200") |
| 29 | private Integer totalStock; | 31 | private Integer totalStock; |
| 30 | 32 | ||
| 31 | - @Schema(description = "秒杀金额,单位:分", required = true, example = "100") // 从秒杀商品里取最低价 | 33 | + @Schema(description = "秒杀金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "100") |
| 34 | + // 从秒杀商品里取最低价 | ||
| 32 | private Integer seckillPrice; | 35 | private Integer seckillPrice; |
| 33 | 36 | ||
| 34 | } | 37 | } |
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; | @@ -9,15 +9,15 @@ import java.util.List; | ||
| 9 | @Data | 9 | @Data |
| 10 | public class AppSeckillConfigRespVO { | 10 | public class AppSeckillConfigRespVO { |
| 11 | 11 | ||
| 12 | - @Schema(description = "秒杀时间段编号", required = true, example = "1024") | 12 | + @Schema(description = "秒杀时间段编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 13 | private Long id; | 13 | private Long id; |
| 14 | 14 | ||
| 15 | - @Schema(description = "开始时间点", required = true, example = "09:00") | 15 | + @Schema(description = "开始时间点", requiredMode = Schema.RequiredMode.REQUIRED, example = "09:00") |
| 16 | private String startTime; | 16 | private String startTime; |
| 17 | - @Schema(description = "结束时间点", required = true, example = "09:59") | 17 | + @Schema(description = "结束时间点", requiredMode = Schema.RequiredMode.REQUIRED, example = "09:59") |
| 18 | private String endTime; | 18 | private String endTime; |
| 19 | 19 | ||
| 20 | - @Schema(description = "轮播图", required = true) | 20 | + @Schema(description = "轮播图", requiredMode = Schema.RequiredMode.REQUIRED) |
| 21 | private List<String> sliderPicUrls; | 21 | private List<String> sliderPicUrls; |
| 22 | 22 | ||
| 23 | } | 23 | } |
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; | @@ -12,22 +12,22 @@ import javax.validation.constraints.NotNull; | ||
| 12 | @Data | 12 | @Data |
| 13 | public class DeliveryExpressBaseVO { | 13 | public class DeliveryExpressBaseVO { |
| 14 | 14 | ||
| 15 | - @Schema(description = "快递公司编码", required = true) | 15 | + @Schema(description = "快递公司编码", requiredMode = Schema.RequiredMode.REQUIRED) |
| 16 | @NotNull(message = "快递公司编码不能为空") | 16 | @NotNull(message = "快递公司编码不能为空") |
| 17 | private String code; | 17 | private String code; |
| 18 | 18 | ||
| 19 | - @Schema(description = "快递公司名称", required = true, example = "李四") | 19 | + @Schema(description = "快递公司名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") |
| 20 | @NotNull(message = "快递公司名称不能为空") | 20 | @NotNull(message = "快递公司名称不能为空") |
| 21 | private String name; | 21 | private String name; |
| 22 | 22 | ||
| 23 | @Schema(description = "快递公司logo") | 23 | @Schema(description = "快递公司logo") |
| 24 | private String logo; | 24 | private String logo; |
| 25 | 25 | ||
| 26 | - @Schema(description = "排序", required = true) | 26 | + @Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED) |
| 27 | @NotNull(message = "排序不能为空") | 27 | @NotNull(message = "排序不能为空") |
| 28 | private Integer sort; | 28 | private Integer sort; |
| 29 | 29 | ||
| 30 | - @Schema(description = "状态", required = true, example = "1") | 30 | + @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 31 | @NotNull(message = "状态不能为空") | 31 | @NotNull(message = "状态不能为空") |
| 32 | private Integer status; | 32 | private Integer status; |
| 33 | 33 |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/express/DeliveryExpressRespVO.java
| 1 | package cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.express; | 1 | package cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.express; |
| 2 | 2 | ||
| 3 | import io.swagger.v3.oas.annotations.media.Schema; | 3 | import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | -import lombok.*; | 4 | +import lombok.Data; |
| 5 | +import lombok.EqualsAndHashCode; | ||
| 6 | +import lombok.ToString; | ||
| 7 | + | ||
| 5 | import java.time.LocalDateTime; | 8 | import java.time.LocalDateTime; |
| 6 | 9 | ||
| 7 | @Schema(description = "管理后台 - 快递公司 Response VO") | 10 | @Schema(description = "管理后台 - 快递公司 Response VO") |
| @@ -10,10 +13,10 @@ import java.time.LocalDateTime; | @@ -10,10 +13,10 @@ import java.time.LocalDateTime; | ||
| 10 | @ToString(callSuper = true) | 13 | @ToString(callSuper = true) |
| 11 | public class DeliveryExpressRespVO extends DeliveryExpressBaseVO { | 14 | public class DeliveryExpressRespVO extends DeliveryExpressBaseVO { |
| 12 | 15 | ||
| 13 | - @Schema(description = "编号", required = true, example = "6592") | 16 | + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "6592") |
| 14 | private Long id; | 17 | private Long id; |
| 15 | 18 | ||
| 16 | - @Schema(description = "创建时间", required = true) | 19 | + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) |
| 17 | private LocalDateTime createTime; | 20 | private LocalDateTime createTime; |
| 18 | 21 | ||
| 19 | } | 22 | } |
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; | @@ -13,7 +13,7 @@ import javax.validation.constraints.NotNull; | ||
| 13 | @ToString(callSuper = true) | 13 | @ToString(callSuper = true) |
| 14 | public class DeliveryExpressUpdateReqVO extends DeliveryExpressBaseVO { | 14 | public class DeliveryExpressUpdateReqVO extends DeliveryExpressBaseVO { |
| 15 | 15 | ||
| 16 | - @Schema(description = "编号", required = true, example = "6592") | 16 | + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "6592") |
| 17 | @NotNull(message = "编号不能为空") | 17 | @NotNull(message = "编号不能为空") |
| 18 | private Long id; | 18 | private Long id; |
| 19 | 19 |
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; | @@ -12,15 +12,15 @@ import javax.validation.constraints.NotNull; | ||
| 12 | @Data | 12 | @Data |
| 13 | public class DeliveryExpressTemplateBaseVO { | 13 | public class DeliveryExpressTemplateBaseVO { |
| 14 | 14 | ||
| 15 | - @Schema(description = "模板名称", required = true, example = "王五") | 15 | + @Schema(description = "模板名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") |
| 16 | @NotNull(message = "模板名称不能为空") | 16 | @NotNull(message = "模板名称不能为空") |
| 17 | private String name; | 17 | private String name; |
| 18 | 18 | ||
| 19 | - @Schema(description = "配送计费方式 1:按件 2:按重量 3:按体积", required = true) | 19 | + @Schema(description = "配送计费方式 1:按件 2:按重量 3:按体积", requiredMode = Schema.RequiredMode.REQUIRED) |
| 20 | @NotNull(message = "配送计费方式 1:按件 2:按重量 3:按体积不能为空") | 20 | @NotNull(message = "配送计费方式 1:按件 2:按重量 3:按体积不能为空") |
| 21 | private Integer chargeMode; | 21 | private Integer chargeMode; |
| 22 | 22 | ||
| 23 | - @Schema(description = "排序", required = true) | 23 | + @Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED) |
| 24 | @NotNull(message = "排序不能为空") | 24 | @NotNull(message = "排序不能为空") |
| 25 | private Integer sort; | 25 | private Integer sort; |
| 26 | 26 |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/expresstemplate/DeliveryExpressTemplateRespVO.java
| 1 | package cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.expresstemplate; | 1 | package cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.expresstemplate; |
| 2 | 2 | ||
| 3 | import io.swagger.v3.oas.annotations.media.Schema; | 3 | import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | -import lombok.*; | 4 | +import lombok.Data; |
| 5 | +import lombok.EqualsAndHashCode; | ||
| 6 | +import lombok.ToString; | ||
| 7 | + | ||
| 5 | import java.time.LocalDateTime; | 8 | import java.time.LocalDateTime; |
| 6 | 9 | ||
| 7 | @Schema(description = "管理后台 - 快递运费模板 Response VO") | 10 | @Schema(description = "管理后台 - 快递运费模板 Response VO") |
| @@ -10,10 +13,10 @@ import java.time.LocalDateTime; | @@ -10,10 +13,10 @@ import java.time.LocalDateTime; | ||
| 10 | @ToString(callSuper = true) | 13 | @ToString(callSuper = true) |
| 11 | public class DeliveryExpressTemplateRespVO extends DeliveryExpressTemplateBaseVO { | 14 | public class DeliveryExpressTemplateRespVO extends DeliveryExpressTemplateBaseVO { |
| 12 | 15 | ||
| 13 | - @Schema(description = "编号,自增", required = true, example = "371") | 16 | + @Schema(description = "编号,自增", requiredMode = Schema.RequiredMode.REQUIRED, example = "371") |
| 14 | private Long id; | 17 | private Long id; |
| 15 | 18 | ||
| 16 | - @Schema(description = "创建时间", required = true) | 19 | + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) |
| 17 | private LocalDateTime createTime; | 20 | private LocalDateTime createTime; |
| 18 | 21 | ||
| 19 | } | 22 | } |
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; | @@ -12,10 +12,10 @@ import lombok.NoArgsConstructor; | ||
| 12 | @AllArgsConstructor | 12 | @AllArgsConstructor |
| 13 | public class DeliveryExpressTemplateSimpleRespVO { | 13 | public class DeliveryExpressTemplateSimpleRespVO { |
| 14 | 14 | ||
| 15 | - @Schema(description = "模版编号", required = true, example = "1024") | 15 | + @Schema(description = "模版编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 16 | private Long id; | 16 | private Long id; |
| 17 | 17 | ||
| 18 | - @Schema(description = "模板名称", required = true, example = "测试模版") | 18 | + @Schema(description = "模板名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "测试模版") |
| 19 | private String name; | 19 | private String name; |
| 20 | 20 | ||
| 21 | } | 21 | } |
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; | @@ -15,7 +15,7 @@ import java.util.List; | ||
| 15 | @ToString(callSuper = true) | 15 | @ToString(callSuper = true) |
| 16 | public class DeliveryExpressTemplateUpdateReqVO extends DeliveryExpressTemplateBaseVO { | 16 | public class DeliveryExpressTemplateUpdateReqVO extends DeliveryExpressTemplateBaseVO { |
| 17 | 17 | ||
| 18 | - @Schema(description = "编号", required = true, example = "371") | 18 | + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "371") |
| 19 | @NotNull(message = "编号不能为空") | 19 | @NotNull(message = "编号不能为空") |
| 20 | private Long id; | 20 | private Long id; |
| 21 | 21 |
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; | @@ -18,49 +18,49 @@ import java.time.LocalTime; | ||
| 18 | @Data | 18 | @Data |
| 19 | public class DeliveryPickUpStoreBaseVO { | 19 | public class DeliveryPickUpStoreBaseVO { |
| 20 | 20 | ||
| 21 | - @Schema(description = "门店名称", required = true, example = "李四") | 21 | + @Schema(description = "门店名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "李四") |
| 22 | @NotBlank(message = "门店名称不能为空") | 22 | @NotBlank(message = "门店名称不能为空") |
| 23 | private String name; | 23 | private String name; |
| 24 | 24 | ||
| 25 | @Schema(description = "门店简介", example = "我是门店简介") | 25 | @Schema(description = "门店简介", example = "我是门店简介") |
| 26 | private String introduction; | 26 | private String introduction; |
| 27 | 27 | ||
| 28 | - @Schema(description = "门店手机", required = true, example = "15601892312") | 28 | + @Schema(description = "门店手机", requiredMode = Schema.RequiredMode.REQUIRED, example = "15601892312") |
| 29 | @NotBlank(message = "门店手机不能为空") | 29 | @NotBlank(message = "门店手机不能为空") |
| 30 | @Mobile | 30 | @Mobile |
| 31 | private String phone; | 31 | private String phone; |
| 32 | 32 | ||
| 33 | - @Schema(description = "区域编号", required = true, example = "18733") | 33 | + @Schema(description = "区域编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "18733") |
| 34 | @NotNull(message = "区域编号不能为空") | 34 | @NotNull(message = "区域编号不能为空") |
| 35 | private Integer areaId; | 35 | private Integer areaId; |
| 36 | 36 | ||
| 37 | - @Schema(description = "门店详细地址", required = true, example = "复旦大学路 188 号") | 37 | + @Schema(description = "门店详细地址", requiredMode = Schema.RequiredMode.REQUIRED, example = "复旦大学路 188 号") |
| 38 | @NotBlank(message = "门店详细地址不能为空") | 38 | @NotBlank(message = "门店详细地址不能为空") |
| 39 | private String detailAddress; | 39 | private String detailAddress; |
| 40 | 40 | ||
| 41 | - @Schema(description = "门店 logo", required = true, example = "https://www.iocoder.cn/1.png") | 41 | + @Schema(description = "门店 logo", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/1.png") |
| 42 | @NotBlank(message = "门店 logo 不能为空") | 42 | @NotBlank(message = "门店 logo 不能为空") |
| 43 | private String logo; | 43 | private String logo; |
| 44 | 44 | ||
| 45 | - @Schema(description = "营业开始时间", required = true) | 45 | + @Schema(description = "营业开始时间", requiredMode = Schema.RequiredMode.REQUIRED) |
| 46 | @NotNull(message = "营业开始时间不能为空") | 46 | @NotNull(message = "营业开始时间不能为空") |
| 47 | @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "HH:mm") | 47 | @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "HH:mm") |
| 48 | private LocalTime openingTime; | 48 | private LocalTime openingTime; |
| 49 | 49 | ||
| 50 | - @Schema(description = "营业结束时间", required = true) | 50 | + @Schema(description = "营业结束时间", requiredMode = Schema.RequiredMode.REQUIRED) |
| 51 | @NotNull(message = "营业结束时间不能为空") | 51 | @NotNull(message = "营业结束时间不能为空") |
| 52 | @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "HH:mm") | 52 | @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "HH:mm") |
| 53 | private LocalTime closingTime; | 53 | private LocalTime closingTime; |
| 54 | 54 | ||
| 55 | - @Schema(description = "纬度", required = true, example = "5.88") | 55 | + @Schema(description = "纬度", requiredMode = Schema.RequiredMode.REQUIRED, example = "5.88") |
| 56 | @NotNull(message = "纬度不能为空") | 56 | @NotNull(message = "纬度不能为空") |
| 57 | private Double latitude; | 57 | private Double latitude; |
| 58 | 58 | ||
| 59 | - @Schema(description = "经度", required = true, example = "6.99") | 59 | + @Schema(description = "经度", requiredMode = Schema.RequiredMode.REQUIRED, example = "6.99") |
| 60 | @NotNull(message = "经度不能为空") | 60 | @NotNull(message = "经度不能为空") |
| 61 | private Double longitude; | 61 | private Double longitude; |
| 62 | 62 | ||
| 63 | - @Schema(description = "门店状态", required = true, example = "1") | 63 | + @Schema(description = "门店状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 64 | @NotNull(message = "门店状态不能为空") | 64 | @NotNull(message = "门店状态不能为空") |
| 65 | @InEnum(CommonStatusEnum.class) | 65 | @InEnum(CommonStatusEnum.class) |
| 66 | private Integer status; | 66 | private Integer status; |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/pickup/DeliveryPickUpStoreRespVO.java
| 1 | package cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.pickup; | 1 | package cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.pickup; |
| 2 | 2 | ||
| 3 | import io.swagger.v3.oas.annotations.media.Schema; | 3 | import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | -import lombok.*; | 4 | +import lombok.Data; |
| 5 | +import lombok.EqualsAndHashCode; | ||
| 6 | +import lombok.ToString; | ||
| 7 | + | ||
| 5 | import java.time.LocalDateTime; | 8 | import java.time.LocalDateTime; |
| 6 | 9 | ||
| 7 | @Schema(description = "管理后台 - 自提门店 Response VO") | 10 | @Schema(description = "管理后台 - 自提门店 Response VO") |
| @@ -10,10 +13,10 @@ import java.time.LocalDateTime; | @@ -10,10 +13,10 @@ import java.time.LocalDateTime; | ||
| 10 | @ToString(callSuper = true) | 13 | @ToString(callSuper = true) |
| 11 | public class DeliveryPickUpStoreRespVO extends DeliveryPickUpStoreBaseVO { | 14 | public class DeliveryPickUpStoreRespVO extends DeliveryPickUpStoreBaseVO { |
| 12 | 15 | ||
| 13 | - @Schema(description = "编号", required = true, example = "23128") | 16 | + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "23128") |
| 14 | private Long id; | 17 | private Long id; |
| 15 | 18 | ||
| 16 | - @Schema(description = "创建时间", required = true) | 19 | + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) |
| 17 | private LocalDateTime createTime; | 20 | private LocalDateTime createTime; |
| 18 | 21 | ||
| 19 | } | 22 | } |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/delivery/vo/pickup/DeliveryPickUpStoreUpdateReqVO.java
| 1 | package cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.pickup; | 1 | package cn.iocoder.yudao.module.trade.controller.admin.delivery.vo.pickup; |
| 2 | 2 | ||
| 3 | import io.swagger.v3.oas.annotations.media.Schema; | 3 | import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | -import lombok.*; | ||
| 5 | -import java.util.*; | ||
| 6 | -import javax.validation.constraints.*; | 4 | +import lombok.Data; |
| 5 | +import lombok.EqualsAndHashCode; | ||
| 6 | +import lombok.ToString; | ||
| 7 | + | ||
| 8 | +import javax.validation.constraints.NotNull; | ||
| 7 | 9 | ||
| 8 | @Schema(description = "管理后台 - 自提门店更新 Request VO") | 10 | @Schema(description = "管理后台 - 自提门店更新 Request VO") |
| 9 | @Data | 11 | @Data |
| @@ -11,7 +13,7 @@ import javax.validation.constraints.*; | @@ -11,7 +13,7 @@ import javax.validation.constraints.*; | ||
| 11 | @ToString(callSuper = true) | 13 | @ToString(callSuper = true) |
| 12 | public class DeliveryPickUpStoreUpdateReqVO extends DeliveryPickUpStoreBaseVO { | 14 | public class DeliveryPickUpStoreUpdateReqVO extends DeliveryPickUpStoreBaseVO { |
| 13 | 15 | ||
| 14 | - @Schema(description = "编号", required = true, example = "23128") | 16 | + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "23128") |
| 15 | @NotNull(message = "编号不能为空") | 17 | @NotNull(message = "编号不能为空") |
| 16 | private Long id; | 18 | private Long id; |
| 17 | 19 |
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 { | @@ -36,7 +36,7 @@ public class AppTradeAfterSaleCreateReqVO { | ||
| 36 | /** | 36 | /** |
| 37 | * @see AfterSaleStatusEnum | 37 | * @see AfterSaleStatusEnum |
| 38 | */ | 38 | */ |
| 39 | - @Schema(description = "操作类型", required = true, example = "1") | 39 | + @Schema(description = "操作类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 40 | @NotNull(message = "操作类型不能为空") | 40 | @NotNull(message = "操作类型不能为空") |
| 41 | private String operateType; | 41 | private String operateType; |
| 42 | 42 |
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; | @@ -11,48 +11,48 @@ import java.util.List; | ||
| 11 | @Data | 11 | @Data |
| 12 | public class AppTradeAfterSalePageItemRespVO { | 12 | public class AppTradeAfterSalePageItemRespVO { |
| 13 | 13 | ||
| 14 | - @Schema(description = "售后编号", required = true, example = "1024") | 14 | + @Schema(description = "售后编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 15 | private Long id; | 15 | private Long id; |
| 16 | 16 | ||
| 17 | - @Schema(description = "售后流水号", required = true, example = "1146347329394184195") | 17 | + @Schema(description = "售后流水号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1146347329394184195") |
| 18 | private String no; | 18 | private String no; |
| 19 | 19 | ||
| 20 | - @Schema(description = "售后状态", required = true, example = "1") | 20 | + @Schema(description = "售后状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 21 | private Integer status; | 21 | private Integer status; |
| 22 | 22 | ||
| 23 | - @Schema(description = "售后方式", required = true, example = "1") | 23 | + @Schema(description = "售后方式", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 24 | private Integer way; | 24 | private Integer way; |
| 25 | 25 | ||
| 26 | - @Schema(description = "售后类型", required = true, example = "1") | 26 | + @Schema(description = "售后类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 27 | private Integer type; | 27 | private Integer type; |
| 28 | 28 | ||
| 29 | - @Schema(description = "申请原因", required = true, example = "1") | 29 | + @Schema(description = "申请原因", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 30 | private String applyReason; | 30 | private String applyReason; |
| 31 | 31 | ||
| 32 | - @Schema(description = "补充描述", required = true, example = "1") | 32 | + @Schema(description = "补充描述", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 33 | private String applyDescription; | 33 | private String applyDescription; |
| 34 | 34 | ||
| 35 | - @Schema(description = "补充凭证图片", required = true, example = "1") | 35 | + @Schema(description = "补充凭证图片", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 36 | private List<String> applyPicUrls; | 36 | private List<String> applyPicUrls; |
| 37 | 37 | ||
| 38 | // ========== 交易订单相关 ========== | 38 | // ========== 交易订单相关 ========== |
| 39 | 39 | ||
| 40 | - @Schema(description = "交易订单编号", required = true, example = "1") | 40 | + @Schema(description = "交易订单编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 41 | private Long orderId; | 41 | private Long orderId; |
| 42 | 42 | ||
| 43 | - @Schema(description = "交易订单流水号", required = true, example = "1") | 43 | + @Schema(description = "交易订单流水号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 44 | private String orderNo; | 44 | private String orderNo; |
| 45 | 45 | ||
| 46 | - @Schema(description = "交易订单项编号", required = true, example = "1") | 46 | + @Schema(description = "交易订单项编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 47 | private Long orderItemId; | 47 | private Long orderItemId; |
| 48 | 48 | ||
| 49 | - @Schema(description = "商品 SPU 编号", required = true, example = "1") | 49 | + @Schema(description = "商品 SPU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 50 | private Long spuId; | 50 | private Long spuId; |
| 51 | 51 | ||
| 52 | - @Schema(description = "商品 SPU 名称", required = true, example = "1") | 52 | + @Schema(description = "商品 SPU 名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 53 | private String spuName; | 53 | private String spuName; |
| 54 | 54 | ||
| 55 | - @Schema(description = "商品 SKU 编号", required = true, example = "1") | 55 | + @Schema(description = "商品 SKU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 56 | private Long skuId; | 56 | private Long skuId; |
| 57 | 57 | ||
| 58 | /** | 58 | /** |
| @@ -60,10 +60,10 @@ public class AppTradeAfterSalePageItemRespVO { | @@ -60,10 +60,10 @@ public class AppTradeAfterSalePageItemRespVO { | ||
| 60 | */ | 60 | */ |
| 61 | private List<AppProductPropertyValueDetailRespVO> properties; | 61 | private List<AppProductPropertyValueDetailRespVO> properties; |
| 62 | 62 | ||
| 63 | - @Schema(description = "商品图片", required = true, example = "https://www.iocoder.cn/01.jpg") | 63 | + @Schema(description = "商品图片", requiredMode = Schema.RequiredMode.REQUIRED, example = "https://www.iocoder.cn/01.jpg") |
| 64 | private String picUrl; | 64 | private String picUrl; |
| 65 | 65 | ||
| 66 | - @Schema(description = "退货商品数量", required = true, example = "1") | 66 | + @Schema(description = "退货商品数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 67 | private Integer count; | 67 | private Integer count; |
| 68 | 68 | ||
| 69 | // ========== 审批相关 ========== | 69 | // ========== 审批相关 ========== |
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 { | @@ -17,7 +17,7 @@ public class AppTradeCartAddReqVO { | ||
| 17 | @NotNull(message = "数量不能为空") | 17 | @NotNull(message = "数量不能为空") |
| 18 | private Integer count; | 18 | private Integer count; |
| 19 | 19 | ||
| 20 | - @Schema(description = "是否添加到购物车", required = true, example = "true") | 20 | + @Schema(description = "是否添加到购物车", requiredMode = Schema.RequiredMode.REQUIRED, example = "true") |
| 21 | @NotNull(message = "是否添加购物车不能为空") | 21 | @NotNull(message = "是否添加购物车不能为空") |
| 22 | private Boolean addStatus; | 22 | private Boolean addStatus; |
| 23 | 23 |
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 { | @@ -25,10 +25,10 @@ public class AppTradeCartListRespVO { | ||
| 25 | @Data | 25 | @Data |
| 26 | public static class Cart { | 26 | public static class Cart { |
| 27 | 27 | ||
| 28 | - @Schema(description = "购物项的编号", required = true, example = "1024") | 28 | + @Schema(description = "购物项的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 29 | private Long id; | 29 | private Long id; |
| 30 | 30 | ||
| 31 | - @Schema(description = "商品数量", required = true, example = "1") | 31 | + @Schema(description = "商品数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 32 | private Integer count; | 32 | private Integer count; |
| 33 | 33 | ||
| 34 | /** | 34 | /** |
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; | @@ -10,11 +10,11 @@ import javax.validation.constraints.NotNull; | ||
| 10 | @Data | 10 | @Data |
| 11 | public class AppTradeCartUpdateReqVO { | 11 | public class AppTradeCartUpdateReqVO { |
| 12 | 12 | ||
| 13 | - @Schema(description = "编号", required = true, example = "1024") | 13 | + @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024") |
| 14 | @NotNull(message = "编号不能为空") | 14 | @NotNull(message = "编号不能为空") |
| 15 | private Long id; | 15 | private Long id; |
| 16 | 16 | ||
| 17 | - @Schema(description = "商品数量", required = true, example = "1") | 17 | + @Schema(description = "商品数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 18 | @NotNull(message = "数量不能为空") | 18 | @NotNull(message = "数量不能为空") |
| 19 | @Min(message = "数量必须大于 0", value = 1L) | 19 | @Min(message = "数量必须大于 0", value = 1L) |
| 20 | private Integer count; | 20 | private Integer count; |
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; | @@ -6,9 +6,7 @@ import cn.hutool.core.util.IdUtil; | ||
| 6 | import cn.hutool.core.util.ObjectUtil; | 6 | import cn.hutool.core.util.ObjectUtil; |
| 7 | import cn.hutool.core.util.StrUtil; | 7 | import cn.hutool.core.util.StrUtil; |
| 8 | import cn.iocoder.yudao.framework.common.core.KeyValue; | 8 | import cn.iocoder.yudao.framework.common.core.KeyValue; |
| 9 | -import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | ||
| 10 | import cn.iocoder.yudao.framework.common.enums.TerminalEnum; | 9 | import cn.iocoder.yudao.framework.common.enums.TerminalEnum; |
| 11 | -import cn.iocoder.yudao.framework.common.enums.UserTypeEnum; | ||
| 12 | import cn.iocoder.yudao.framework.common.pojo.PageResult; | 10 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 13 | import cn.iocoder.yudao.framework.common.util.json.JsonUtils; | 11 | import cn.iocoder.yudao.framework.common.util.json.JsonUtils; |
| 14 | import cn.iocoder.yudao.module.member.api.address.AddressApi; | 12 | import cn.iocoder.yudao.module.member.api.address.AddressApi; |
| @@ -25,9 +23,7 @@ import cn.iocoder.yudao.module.promotion.api.coupon.CouponApi; | @@ -25,9 +23,7 @@ import cn.iocoder.yudao.module.promotion.api.coupon.CouponApi; | ||
| 25 | import cn.iocoder.yudao.module.promotion.api.coupon.dto.CouponUseReqDTO; | 23 | import cn.iocoder.yudao.module.promotion.api.coupon.dto.CouponUseReqDTO; |
| 26 | import cn.iocoder.yudao.module.system.api.notify.NotifyMessageSendApi; | 24 | import cn.iocoder.yudao.module.system.api.notify.NotifyMessageSendApi; |
| 27 | import cn.iocoder.yudao.module.system.api.notify.dto.NotifySendSingleToUserReqDTO; | 25 | import cn.iocoder.yudao.module.system.api.notify.dto.NotifySendSingleToUserReqDTO; |
| 28 | -import cn.iocoder.yudao.module.system.api.notify.dto.NotifyTemplateReqDTO; | ||
| 29 | import cn.iocoder.yudao.module.system.api.user.AdminUserApi; | 26 | import cn.iocoder.yudao.module.system.api.user.AdminUserApi; |
| 30 | -import cn.iocoder.yudao.module.system.enums.notify.NotifyTemplateTypeEnum; | ||
| 31 | import cn.iocoder.yudao.module.trade.controller.admin.order.vo.TradeOrderDeliveryReqVO; | 27 | import cn.iocoder.yudao.module.trade.controller.admin.order.vo.TradeOrderDeliveryReqVO; |
| 32 | import cn.iocoder.yudao.module.trade.controller.admin.order.vo.TradeOrderPageReqVO; | 28 | import cn.iocoder.yudao.module.trade.controller.admin.order.vo.TradeOrderPageReqVO; |
| 33 | import cn.iocoder.yudao.module.trade.controller.app.order.vo.AppTradeOrderCreateReqVO; | 29 | import cn.iocoder.yudao.module.trade.controller.app.order.vo.AppTradeOrderCreateReqVO; |
| @@ -357,28 +353,12 @@ public class TradeOrderServiceImpl implements TradeOrderService { | @@ -357,28 +353,12 @@ public class TradeOrderServiceImpl implements TradeOrderService { | ||
| 357 | // TODO 芋艿:发送订单变化的消息 | 353 | // TODO 芋艿:发送订单变化的消息 |
| 358 | 354 | ||
| 359 | // TODO 芋艿:发送站内信 fix | 355 | // TODO 芋艿:发送站内信 fix |
| 360 | - // TODO @puhui999:使用 sendSingleMessageToMember 呀;走模版;不用判断模版是否存在哈 | ||
| 361 | - // 1、获取模版编码为 order_delivery 的模版,判断是否存在 存在放回 true | ||
| 362 | - if (!notifyMessageSendApi.validateNotifyTemplate("order_delivery")) { | ||
| 363 | - // 1、1 站内信模版不存在则创建模版 | ||
| 364 | - NotifyTemplateReqDTO templateReqDTO = new NotifyTemplateReqDTO(); | ||
| 365 | - templateReqDTO.setName("订单发货通知模版"); | ||
| 366 | - templateReqDTO.setCode("order_delivery"); | ||
| 367 | - templateReqDTO.setType(NotifyTemplateTypeEnum.NOTIFICATION_MESSAGE.getType()); // 系统消息 | ||
| 368 | - // 获取操作用户 | ||
| 369 | - // AdminUserRespDTO user = adminUserApi.getUser(userId); | ||
| 370 | - // templateReqDTO.setNickname(user.getNickname()); | ||
| 371 | - templateReqDTO.setNickname(UserTypeEnum.ADMIN.getName()); | ||
| 372 | - templateReqDTO.setContent("订单:{orderId}{msg}"); | ||
| 373 | - templateReqDTO.setStatus(CommonStatusEnum.ENABLE.getStatus()); | ||
| 374 | - notifyMessageSendApi.createNotifyTemplate(templateReqDTO); | ||
| 375 | - } | ||
| 376 | - // 2、构造消息 | 356 | + // 1、构造消息 |
| 377 | Map<String, Object> msgMap = new HashMap<>(); | 357 | Map<String, Object> msgMap = new HashMap<>(); |
| 378 | msgMap.put("orderId", deliveryReqVO.getId()); | 358 | msgMap.put("orderId", deliveryReqVO.getId()); |
| 379 | msgMap.put("msg", TradeOrderStatusEnum.DELIVERED.getStatus()); | 359 | msgMap.put("msg", TradeOrderStatusEnum.DELIVERED.getStatus()); |
| 380 | // 2、发送站内信 | 360 | // 2、发送站内信 |
| 381 | - notifyMessageSendApi.sendSingleMessageToAdmin( | 361 | + notifyMessageSendApi.sendSingleMessageToMember( |
| 382 | new NotifySendSingleToUserReqDTO() | 362 | new NotifySendSingleToUserReqDTO() |
| 383 | .setUserId(userId) | 363 | .setUserId(userId) |
| 384 | .setTemplateCode("order_delivery") | 364 | .setTemplateCode("order_delivery") |