feat: knife4j springdoc

This commit is contained in:
xingyu
2022-12-22 00:25:22 +08:00
parent 69420c0a9c
commit cacefb4eea
385 changed files with 1939 additions and 1941 deletions

View File

@@ -11,22 +11,22 @@ import javax.validation.constraints.NotNull;
@Data
public class ProductBrandBaseVO {
@Schema(title = "品牌名称", required = true, example = "芋道")
@Schema(description = "品牌名称", required = true, example = "芋道")
@NotNull(message = "品牌名称不能为空")
private String name;
@Schema(title = "品牌图片", required = true)
@Schema(description = "品牌图片", required = true)
@NotNull(message = "品牌图片不能为空")
private String picUrl;
@Schema(title = "品牌排序", required = true, example = "1")
@Schema(description = "品牌排序", required = true, example = "1")
@NotNull(message = "品牌排序不能为空")
private Integer sort;
@Schema(title = "品牌描述", example = "描述")
@Schema(description = "品牌描述", example = "描述")
private String description;
@Schema(title = "状态", required = true, example = "0")
@Schema(description = "状态", required = true, example = "0")
@NotNull(message = "状态不能为空")
private Integer status;

View File

@@ -2,7 +2,7 @@ package cn.iocoder.yudao.module.product.controller.admin.brand.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
@Schema(title = "管理后台 - 商品品牌创建 Request VO")
@Schema(description = "管理后台 - 商品品牌创建 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)

View File

@@ -3,11 +3,11 @@ package cn.iocoder.yudao.module.product.controller.admin.brand.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Schema(title = "管理后台 - 商品品牌分页 Request VO")
@Schema(description = "管理后台 - 商品品牌分页 Request VO")
@Data
public class ProductBrandListReqVO {
@Schema(title = "品牌名称", example = "芋道")
@Schema(description = "品牌名称", example = "芋道")
private String name;
}

View File

@@ -11,20 +11,20 @@ import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(title = "管理后台 - 商品品牌分页 Request VO")
@Schema(description = "管理后台 - 商品品牌分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProductBrandPageReqVO extends PageParam {
@Schema(title = "品牌名称", example = "芋道")
@Schema(description = "品牌名称", example = "芋道")
private String name;
@Schema(title = "状态", example = "0", description = "参考 CommonStatusEnum 枚举")
@Schema(description = "状态-参考 CommonStatusEnum 枚举", example = "0")
private Integer status;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@Schema(title = "创建时间")
@Schema(description = "创建时间")
private LocalDateTime[] createTime;
}

View File

@@ -7,16 +7,16 @@ import lombok.ToString;
import java.time.LocalDateTime;
@Schema(title = "管理后台 - 品牌 Response VO")
@Schema(description = "管理后台 - 品牌 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProductBrandRespVO extends ProductBrandBaseVO {
@Schema(title = "品牌编号", required = true, example = "1")
@Schema(description = "品牌编号", required = true, example = "1")
private Long id;
@Schema(title = "创建时间", required = true)
@Schema(description = "创建时间", required = true)
private LocalDateTime createTime;
}

View File

@@ -3,13 +3,13 @@ import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import javax.validation.constraints.*;
@Schema(title = "管理后台 - 商品品牌更新 Request VO")
@Schema(description = "管理后台 - 商品品牌更新 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProductBrandUpdateReqVO extends ProductBrandBaseVO {
@Schema(title = "品牌编号", required = true, example = "1")
@Schema(description = "品牌编号", required = true, example = "1")
@NotNull(message = "品牌编号不能为空")
private Long id;

View File

@@ -12,25 +12,25 @@ import javax.validation.constraints.NotNull;
@Data
public class ProductCategoryBaseVO {
@Schema(title = "父分类编号", required = true, example = "1")
@Schema(description = "父分类编号", required = true, example = "1")
@NotNull(message = "父分类编号不能为空")
private Long parentId;
@Schema(title = "分类名称", required = true, example = "办公文具")
@Schema(description = "分类名称", required = true, example = "办公文具")
@NotBlank(message = "分类名称不能为空")
private String name;
@Schema(title = "分类图片", required = true)
@Schema(description = "分类图片", required = true)
@NotBlank(message = "分类图片不能为空")
private String picUrl;
@Schema(title = "分类排序", required = true, example = "1")
@Schema(description = "分类排序", required = true, example = "1")
private Integer sort;
@Schema(title = "分类描述", required = true, example = "描述")
@Schema(description = "分类描述", required = true, example = "描述")
private String description;
@Schema(title = "开启状态", required = true, example = "0")
@Schema(description = "开启状态", required = true, example = "0")
@NotNull(message = "开启状态不能为空")
private Integer status;

View File

@@ -2,7 +2,7 @@ package cn.iocoder.yudao.module.product.controller.admin.category.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
@Schema(title = "管理后台 - 商品分类创建 Request VO")
@Schema(description = "管理后台 - 商品分类创建 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)

View File

@@ -3,11 +3,11 @@ package cn.iocoder.yudao.module.product.controller.admin.category.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Schema(title = "管理后台 - 商品分类列表查询 Request VO")
@Schema(description = "管理后台 - 商品分类列表查询 Request VO")
@Data
public class ProductCategoryListReqVO {
@Schema(title = "分类名称", example = "办公文具")
@Schema(description = "分类名称", example = "办公文具")
private String name;
}

View File

@@ -4,16 +4,16 @@ import lombok.*;
import java.time.LocalDateTime;
@Schema(title = "管理后台 - 商品分类 Response VO")
@Schema(description = "管理后台 - 商品分类 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProductCategoryRespVO extends ProductCategoryBaseVO {
@Schema(title = "分类编号", required = true, example = "2")
@Schema(description = "分类编号", required = true, example = "2")
private Long id;
@Schema(title = "创建时间", required = true)
@Schema(description = "创建时间", required = true)
private LocalDateTime createTime;
}

View File

@@ -3,13 +3,13 @@ import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import javax.validation.constraints.*;
@Schema(title = "管理后台 - 商品分类更新 Request VO")
@Schema(description = "管理后台 - 商品分类更新 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProductCategoryUpdateReqVO extends ProductCategoryBaseVO {
@Schema(title = "分类编号", required = true, example = "2")
@Schema(description = "分类编号", required = true, example = "2")
@NotNull(message = "分类编号不能为空")
private Long id;

View File

@@ -12,22 +12,22 @@ import java.util.List;
* @CreateDate: 2022/7/5 21:29
* @Version: 1.0.0
*/
@Schema(title = "管理后台 - 规格名称详情展示 Request VO")
@Schema(description = "管理后台 - 规格名称详情展示 Request VO")
@Data
@ToString(callSuper = true)
public class ProductPropertyViewRespVO {
@Schema(title = "规格名称id", example = "1")
@Schema(description = "规格名称id", example = "1")
public Long propertyId;
@Schema(title = "规格名称", example = "内存")
@Schema(description = "规格名称", example = "内存")
public String name;
@Schema(title = "规格属性值集合", example = "[{\"v1\":11,\"v2\":\"64G\"},{\"v1\":10,\"v2\":\"32G\"}]")
@Schema(description = "规格属性值集合", example = "[{\"v1\":11,\"v2\":\"64G\"},{\"v1\":10,\"v2\":\"32G\"}]")
public List<Tuple2> propertyValues;
@Data
@Schema(title = "规格属性值元组")
@Schema(description = "规格属性值元组")
public static class Tuple2 {
private final long id;
private final String name;

View File

@@ -9,16 +9,16 @@ import lombok.ToString;
import java.time.LocalDateTime;
import java.util.List;
@Schema(title = "管理后台 - 规格 + 规格值 Response VO")
@Schema(description = "管理后台 - 规格 + 规格值 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProductPropertyAndValueRespVO extends ProductPropertyBaseVO {
@Schema(title = "规格的编号", required = true, example = "1024")
@Schema(description = "规格的编号", required = true, example = "1024")
private Long id;
@Schema(title = "创建时间", required = true)
@Schema(description = "创建时间", required = true)
private LocalDateTime createTime;
/**

View File

@@ -12,14 +12,14 @@ import javax.validation.constraints.NotNull;
@Data
public class ProductPropertyBaseVO {
@Schema(title = "规格名称", required = true, example = "颜色")
@Schema(description = "规格名称", required = true, example = "颜色")
@NotBlank(message = "规格名称不能为空")
private String name;
@Schema(title = "备注", example = "颜色")
@Schema(description = "备注", example = "颜色")
private String remark;
@Schema(title = "状态", required = true, example = "1", description = "参见 CommonStatusEnum 枚举")
@Schema(description = "状态-参见 CommonStatusEnum 枚举", required = true, example = "1")
@NotNull(message = "状态不能为空")
private Integer status;

View File

@@ -4,7 +4,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@Schema(title = "管理后台 - 规格名称创建 Request VO")
@Schema(description = "管理后台 - 规格名称创建 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)

View File

@@ -4,15 +4,15 @@ import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;
@Schema(title = "管理后台 - 规格名称 List Request VO")
@Schema(description = "管理后台 - 规格名称 List Request VO")
@Data
@ToString(callSuper = true)
public class ProductPropertyListReqVO {
@Schema(title = "规格名称", example = "颜色")
@Schema(description = "规格名称", example = "颜色")
private String name;
@Schema(title = "状态", required = true, example = "1", description = "参见 CommonStatusEnum 枚举")
@Schema(description = "状态,参见 CommonStatusEnum 枚举", required = true, example = "1")
private Integer status;
}

View File

@@ -11,20 +11,20 @@ import java.time.LocalDateTime;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(title = "管理后台 - 规格名称分页 Request VO")
@Schema(description = "管理后台 - 规格名称分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProductPropertyPageReqVO extends PageParam {
@Schema(title = "规格名称", example = "颜色")
@Schema(description = "规格名称", example = "颜色")
private String name;
@Schema(title = "状态", required = true, example = "1", description = "参见 CommonStatusEnum 枚举")
@Schema(description = "状态,参见 CommonStatusEnum 枚举", required = true, example = "1")
private Integer status;
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
@Schema(title = "创建时间")
@Schema(description = "创建时间")
private LocalDateTime[] createTime;
}

View File

@@ -7,16 +7,16 @@ import lombok.ToString;
import java.time.LocalDateTime;
@Schema(title = "管理后台 - 规格 + 规格值 Response VO")
@Schema(description = "管理后台 - 规格 + 规格值 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProductPropertyRespVO extends ProductPropertyBaseVO {
@Schema(title = "规格的编号", required = true, example = "1024")
@Schema(description = "规格的编号", required = true, example = "1024")
private Long id;
@Schema(title = "创建时间", required = true)
@Schema(description = "创建时间", required = true)
private LocalDateTime createTime;
}

View File

@@ -3,13 +3,13 @@ import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import javax.validation.constraints.*;
@Schema(title = "管理后台 - 规格名称更新 Request VO")
@Schema(description = "管理后台 - 规格名称更新 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProductPropertyUpdateReqVO extends ProductPropertyBaseVO {
@Schema(title = "主键", required = true, example = "1")
@Schema(description = "主键", required = true, example = "1")
@NotNull(message = "主键不能为空")
private Long id;

View File

@@ -12,19 +12,19 @@ import javax.validation.constraints.NotNull;
@Data
public class ProductPropertyValueBaseVO {
@Schema(title = "规格编号", required = true, example = "1024")
@Schema(description = "规格编号", required = true, example = "1024")
@NotNull(message = "规格编号不能为空")
private Long propertyId;
@Schema(title = "规格值名字", required = true, example = "红色")
@Schema(description = "规格值名字", required = true, example = "红色")
@NotEmpty(message = "规格值名字不能为空")
private String name;
@Schema(title = "状态", required = true, example = "1", description = "参见 CommonStatusEnum 枚举")
@Schema(description = "状态,参见 CommonStatusEnum 枚举", required = true, example = "1")
@NotNull(message = "状态不能为空")
private Integer status;
@Schema(title = "备注", example = "颜色")
@Schema(description = "备注", example = "颜色")
private String remark;
}

View File

@@ -2,7 +2,7 @@ package cn.iocoder.yudao.module.product.controller.admin.property.vo.value;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
@Schema(title = "管理后台 - 规格值创建 Request VO")
@Schema(description = "管理后台 - 规格值创建 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)

View File

@@ -12,19 +12,19 @@ import java.util.Date;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@Schema(title = "管理后台 - 规格名称值分页 Request VO")
@Schema(description = "管理后台 - 规格名称值分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProductPropertyValuePageReqVO extends PageParam {
@Schema(title = "规格id", example = "1024")
@Schema(description = "规格id", example = "1024")
private String propertyId;
@Schema(title = "规格值", example = "红色")
@Schema(description = "规格值", example = "红色")
private String name;
@Schema(title = "状态", required = true, example = "1", description = "参见 CommonStatusEnum 枚举")
@Schema(description = "状态,参见 CommonStatusEnum 枚举", required = true, example = "1")
private Integer status;
}

View File

@@ -7,16 +7,16 @@ import lombok.ToString;
import java.time.LocalDateTime;
@Schema(title = "管理后台 - 规格值 Response VO")
@Schema(description = "管理后台 - 规格值 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProductPropertyValueRespVO extends ProductPropertyValueBaseVO {
@Schema(title = "主键", required = true, example = "10")
@Schema(description = "主键", required = true, example = "10")
private Long id;
@Schema(title = "创建时间")
@Schema(description = "创建时间")
private LocalDateTime createTime;
}

View File

@@ -3,13 +3,13 @@ import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import javax.validation.constraints.*;
@Schema(title = "管理后台 - 规格值更新 Request VO")
@Schema(description = "管理后台 - 规格值更新 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProductPropertyValueUpdateReqVO extends ProductPropertyValueBaseVO {
@Schema(title = "主键", required = true, example = "1024")
@Schema(description = "主键", required = true, example = "1024")
@NotNull(message = "主键不能为空")
private Long id;

View File

@@ -15,54 +15,54 @@ import javax.validation.constraints.NotNull;
@Data
public class ProductSkuBaseVO {
@Schema(title = "商品 SKU 名字", required = true, example = "芋道")
@Schema(description = "商品 SKU 名字", required = true, example = "芋道")
@NotEmpty(message = "商品 SKU 名字不能为空")
private String name;
@Schema(title = "销售价格,单位:分", required = true, example = "1024", description = "单位:分")
@Schema(description = "销售价格,单位:分", required = true, example = "1024")
@NotNull(message = "销售价格,单位:分不能为空")
private Integer price;
@Schema(title = "市场价", example = "1024", description = "单位:分")
@Schema(description = "市场价,单位:分", example = "1024")
private Integer marketPrice;
@Schema(title = "成本价", example = "1024", description = "单位:分")
@Schema(description = "成本价,单位:分", example = "1024")
private Integer costPrice;
@Schema(title = "条形码", example = "haha")
@Schema(description = "条形码", example = "haha")
private String barCode;
@Schema(title = "图片地址", required = true, example = "https://www.iocoder.cn/xx.png")
@Schema(description = "图片地址", required = true, example = "https://www.iocoder.cn/xx.png")
@NotNull(message = "图片地址不能为空")
private String picUrl;
@Schema(title = "SKU 状态", required = true, example = "1", description = "参见 CommonStatusEnum 枚举")
@Schema(description = "SKU 状态,参见 CommonStatusEnum 枚举", required = true, example = "1")
@NotNull(message = "SKU 状态不能为空")
@InEnum(CommonStatusEnum.class)
private Integer status;
@Schema(title = "库存", required = true, example = "1")
@Schema(description = "库存", required = true, example = "1")
@NotNull(message = "库存不能为空")
private Integer stock;
@Schema(title = "预警预存", example = "1")
@Schema(description = "预警预存", example = "1")
private Integer warnStock;
@Schema(title = "商品重量", example = "1", description = "单位kg 千克")
@Schema(description = "商品重量,单位kg 千克", example = "1")
private Double weight;
@Schema(title = "商品体积", example = "1024", description = "单位m^3 平米")
@Schema(description = "商品体积,单位m^3 平米", example = "1024")
private Double volume;
@Schema(title = "规格值")
@Schema(description = "规格值")
@Data
public static class Property {
@Schema(title = "属性编号", required = true, example = "1")
@Schema(description = "属性编号", required = true, example = "1")
@NotNull(message = "属性编号不能为空")
private Long propertyId;
@Schema(title = "属性值编号", required = true, example = "1024")
@Schema(description = "属性值编号", required = true, example = "1024")
@NotNull(message = "属性值编号不能为空")
private Long valueId;

View File

@@ -7,13 +7,13 @@ import lombok.ToString;
import java.util.List;
@Schema(title = "管理后台 - 商品 SKU 创建/更新 Request VO")
@Schema(description = "管理后台 - 商品 SKU 创建/更新 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProductSkuCreateOrUpdateReqVO extends ProductSkuBaseVO {
@Schema(title = "商品 SKU 编号", example = "1")
@Schema(description = "商品 SKU 编号", example = "1")
private Long id;
/**

View File

@@ -3,28 +3,28 @@ package cn.iocoder.yudao.module.product.controller.admin.sku.vo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Schema(title = "管理后台 - 商品 SKU 选项 Response VO", description = "用于前端 SELECT 选项")
@Schema(description = "管理后台 - 商品 SKU 选项 Response VO,用于前端 SELECT 选项")
@Data
public class ProductSkuOptionRespVO {
@Schema(title = "主键", required = true, example = "1024")
@Schema(description = "主键", required = true, example = "1024")
private Long id;
@Schema(title = "商品 SKU 名字", example = "红色")
@Schema(description = "商品 SKU 名字", example = "红色")
private String name;
@Schema(title = "销售价格", required = true, example = "100", description = "单位:分")
@Schema(description = "销售价格,单位:分", required = true, example = "100")
private String price;
@Schema(title = "库存", required = true, example = "100")
@Schema(description = "库存", required = true, example = "100")
private Integer stock;
// ========== 商品 SPU 信息 ==========
@Schema(title = "商品 SPU 编号", required = true, example = "1")
@Schema(description = "商品 SPU 编号", required = true, example = "1")
private Long spuId;
@Schema(title = "商品 SPU 名字", required = true, example = "iPhone 11")
@Schema(description = "商品 SPU 名字", required = true, example = "iPhone 11")
private String spuName;
}

View File

@@ -8,16 +8,16 @@ import lombok.ToString;
import java.time.LocalDateTime;
import java.util.List;
@Schema(title = "管理后台 - 商品 SKU Response VO")
@Schema(description = "管理后台 - 商品 SKU Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProductSkuRespVO extends ProductSkuBaseVO {
@Schema(title = "主键", required = true, example = "1024")
@Schema(description = "主键", required = true, example = "1024")
private Long id;
@Schema(title = "创建时间")
@Schema(description = "创建时间")
private LocalDateTime createTime;
/**

View File

@@ -17,75 +17,75 @@ import java.util.List;
@Data
public class ProductSpuBaseVO {
@Schema(title = "商品名称", required = true, example = "芋道")
@Schema(description = "商品名称", required = true, example = "芋道")
@NotEmpty(message = "商品名称不能为空")
private String name;
@Schema(title = "商品编码", example = "yudaoyuanma")
@Schema(description = "商品编码", example = "yudaoyuanma")
private String code;
@Schema(title = "促销语", example = "好吃!")
@Schema(description = "促销语", example = "好吃!")
private String sellPoint;
@Schema(title = "商品详情", required = true, example = "我是商品描述")
@Schema(description = "商品详情", required = true, example = "我是商品描述")
@NotNull(message = "商品详情不能为空")
private String description;
@Schema(title = "商品分类编号", required = true, example = "1")
@Schema(description = "商品分类编号", required = true, example = "1")
@NotNull(message = "商品分类编号不能为空")
private Long categoryId;
@Schema(title = "商品品牌编号", example = "1")
@Schema(description = "商品品牌编号", example = "1")
private Long brandId;
@Schema(title = "商品图片的数组", required = true)
@Schema(description = "商品图片的数组", required = true)
@NotNull(message = "商品图片的数组不能为空")
private List<String> picUrls;
@Schema(title = "商品视频", required = true)
@Schema(description = "商品视频", required = true)
private String videoUrl;
@Schema(title = "排序字段", required = true, example = "1")
@Schema(description = "排序字段", required = true, example = "1")
private Integer sort;
@Schema(title = "商品状态", required = true, example = "1", description = "参见 ProductSpuStatusEnum 枚举类")
@Schema(description = "商品状态,参见 ProductSpuStatusEnum 枚举类", required = true, example = "1")
@NotNull(message = "商品状态不能为空")
@InEnum(ProductSpuStatusEnum.class)
private Integer status;
// ========== SKU 相关字段 =========
@Schema(title = "规格类型", required = true, example = "1", description = "参见 ProductSpuSpecTypeEnum 枚举类")
@Schema(description = "规格类型,参见 ProductSpuSpecTypeEnum 枚举类", required = true, example = "1")
@NotNull(message = "规格类型不能为空")
@InEnum(ProductSpuSpecTypeEnum.class)
private Integer specType;
@Schema(title = "是否展示库存", required = true, example = "true")
@Schema(description = "是否展示库存", required = true, example = "true")
@NotNull(message = "是否展示库存不能为空")
private Boolean showStock;
@Schema(title = "库存", required = true, example = "true")
@Schema(description = "库存", required = true, example = "true")
private Integer totalStock;
@Schema(title = "市场价", example = "1024")
@Schema(description = "市场价", example = "1024")
private Integer marketPrice;
@Schema(title = " 最小价格,单位使用:分", required = true, example = "1024")
@Schema(description = " 最小价格,单位使用:分", required = true, example = "1024")
private Integer minPrice;
@Schema(title = "最大价格,单位使用:分", required = true, example = "1024")
@Schema(description = "最大价格,单位使用:分", required = true, example = "1024")
private Integer maxPrice;
// ========== 统计相关字段 =========
@Schema(title = "商品销量", example = "1024")
@Schema(description = "商品销量", example = "1024")
private Integer salesCount;
@Schema(title = "虚拟销量", required = true, example = "1024")
@Schema(description = "虚拟销量", required = true, example = "1024")
@NotNull(message = "虚拟销量不能为空")
private Integer virtualSalesCount;
@Schema(title = "点击量", example = "1024")
@Schema(description = "点击量", example = "1024")
private Integer clickCount;
}

View File

@@ -9,7 +9,7 @@ import lombok.ToString;
import javax.validation.Valid;
import java.util.List;
@Schema(title = "管理后台 - 商品 SPU 创建 Request VO")
@Schema(description = "管理后台 - 商品 SPU 创建 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)

View File

@@ -10,16 +10,16 @@ import lombok.ToString;
import java.time.LocalDateTime;
import java.util.List;
@Schema(title = "管理后台 - 商品 SPU 详细 Response VO", description = "包括关联的 SKU 等信息")
@Schema(description = "管理后台 - 商品 SPU 详细 Response VO,包括关联的 SKU 等信息")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProductSpuDetailRespVO extends ProductSpuBaseVO {
@Schema(title = "主键", required = true, example = "1")
@Schema(description = "主键", required = true, example = "1")
private Long id;
@Schema(title = "创建时间")
@Schema(description = "创建时间")
private LocalDateTime createTime;
/**
@@ -27,7 +27,7 @@ public class ProductSpuDetailRespVO extends ProductSpuBaseVO {
*/
private List<Sku> skus;
@Schema(title = "管理后台 - 商品 SKU 详细 Response VO")
@Schema(description = "管理后台 - 商品 SKU 详细 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@@ -40,25 +40,25 @@ public class ProductSpuDetailRespVO extends ProductSpuBaseVO {
}
@Schema(title = "管理后台 - 商品规格的详细 Response VO")
@Schema(description = "管理后台 - 商品规格的详细 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public static class Property extends ProductSkuBaseVO.Property {
@Schema(title = "规格的名字", required = true, example = "颜色")
@Schema(description = "规格的名字", required = true, example = "颜色")
private String propertyName;
@Schema(title = "规格值的名字", required = true, example = "蓝色")
@Schema(description = "规格值的名字", required = true, example = "蓝色")
private String valueName;
}
@Schema(title = "分类 id 数组,一直递归到一级父节点", example = "4")
@Schema(description = "分类 id 数组,一直递归到一级父节点", example = "4")
private Long categoryId;
// TODO @芋艿:在瞅瞅~
@Schema(title = "规格属性修改和详情展示组合", example = "[{\"propertyId\":2,\"name\":\"内存\",\"propertyValues\":[{\"v1\":11,\"v2\":\"64G\"},{\"v1\":10,\"v2\":\"32G\"}]},{\"propertyId\":3,\"name\":\"尺寸\",\"propertyValues\":[{\"v1\":16,\"v2\":\"6.1\"},{\"v1\":15,\"v2\":\"5.7\"}]}]")
@Schema(description = "规格属性修改和详情展示组合", example = "[{\"propertyId\":2,\"name\":\"内存\",\"propertyValues\":[{\"v1\":11,\"v2\":\"64G\"},{\"v1\":10,\"v2\":\"32G\"}]},{\"propertyId\":3,\"name\":\"尺寸\",\"propertyValues\":[{\"v1\":16,\"v2\":\"6.1\"},{\"v1\":15,\"v2\":\"5.7\"}]}]")
private List<ProductPropertyViewRespVO> productPropertyViews;
}

View File

@@ -6,40 +6,40 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@Schema(title = "管理后台 - 商品 SPU 分页 Request VO")
@Schema(description = "管理后台 - 商品 SPU 分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProductSpuPageReqVO extends PageParam {
@Schema(title = "商品名称", example = "yutou")
@Schema(description = "商品名称", example = "yutou")
private String name;
@Schema(title = "商品编码", example = "yudaoyuanma")
@Schema(description = "商品编码", example = "yudaoyuanma")
private String code;
@Schema(title = "分类id", example = "1")
@Schema(description = "分类id", example = "1")
private Long categoryId;
@Schema(title = "商品品牌编号", example = "1")
@Schema(description = "商品品牌编号", example = "1")
private Long brandId;
@Schema(title = "上下架状态", example = "1", description = "参见 ProductSpuStatusEnum 枚举值")
@Schema(description = "上下架状态,参见 ProductSpuStatusEnum 枚举值", example = "1")
private Integer status;
@Schema(title = "销量最小值", example = "1")
@Schema(description = "销量最小值", example = "1")
private Integer salesCountMin;
@Schema(title = "销量最大值", example = "1024")
@Schema(description = "销量最大值", example = "1024")
private Integer salesCountMax;
@Schema(title = "市场价最小值", example = "1")
@Schema(description = "市场价最小值", example = "1")
private Integer marketPriceMin;
@Schema(title = "市场价最大值", example = "1024")
@Schema(description = "市场价最大值", example = "1024")
private Integer marketPriceMax;
@Schema(title = "是否库存告警", example = "true")
@Schema(description = "是否库存告警", example = "true")
private Boolean alarmStock;
}

View File

@@ -8,16 +8,16 @@ import lombok.ToString;
import java.time.LocalDateTime;
import java.util.List;
@Schema(title = "管理后台 - 商品 SPU Response VO")
@Schema(description = "管理后台 - 商品 SPU Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProductSpuRespVO extends ProductSpuBaseVO {
@Schema(title = "主键", required = true, example = "1")
@Schema(description = "主键", required = true, example = "1")
private Long id;
@Schema(title = "创建时间")
@Schema(description = "创建时间")
private LocalDateTime createTime;
}

View File

@@ -5,22 +5,22 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@Schema(title = "管理后台 - 商品 SPU 精简 Response VO")
@Schema(description = "管理后台 - 商品 SPU 精简 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProductSpuSimpleRespVO extends ProductSpuBaseVO {
@Schema(title = "主键", required = true, example = "1")
@Schema(description = "主键", required = true, example = "1")
private Long id;
@Schema(title = "商品名称", required = true, example = "芋道")
@Schema(description = "商品名称", required = true, example = "芋道")
private String name;
@Schema(title = " 最小价格,单位使用:分", required = true, example = "1024")
@Schema(description = " 最小价格,单位使用:分", required = true, example = "1024")
private Integer minPrice;
@Schema(title = "最大价格,单位使用:分", required = true, example = "1024")
@Schema(description = "最大价格,单位使用:分", required = true, example = "1024")
private Integer maxPrice;
}

View File

@@ -10,13 +10,13 @@ import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.List;
@Schema(title = "管理后台 - 商品 SPU 更新 Request VO")
@Schema(description = "管理后台 - 商品 SPU 更新 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ProductSpuUpdateReqVO extends ProductSpuBaseVO {
@Schema(title = "商品编号", required = true, example = "1")
@Schema(description = "商品编号", required = true, example = "1")
@NotNull(message = "商品编号不能为空")
private Long id;

View File

@@ -7,21 +7,21 @@ import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
@Data
@Schema(title = "用户 APP - 商品分类 Response VO")
@Schema(description = "用户 APP - 商品分类 Response VO")
public class AppCategoryRespVO {
@Schema(title = "分类编号", required = true, example = "2")
@Schema(description = "分类编号", required = true, example = "2")
private Long id;
@Schema(title = "父分类编号", required = true, example = "1")
@Schema(description = "父分类编号", required = true, example = "1")
@NotNull(message = "父分类编号不能为空")
private Long parentId;
@Schema(title = "分类名称", required = true, example = "办公文具")
@Schema(description = "分类名称", required = true, example = "办公文具")
@NotBlank(message = "分类名称不能为空")
private String name;
@Schema(title = "分类图片", required = true)
@Schema(description = "分类图片", required = true)
@NotBlank(message = "分类图片不能为空")
private String picUrl;

View File

@@ -6,12 +6,12 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@Schema(title = "App - 商品spu分页 Request VO")
@Schema(description = "App - 商品spu分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class AppSpuPageReqVO extends PageParam {
@Schema(title = "分类id")
@Schema(description = "分类id")
private Long categoryId;
}

View File

@@ -6,46 +6,46 @@ import lombok.Data;
import javax.validation.constraints.NotNull;
import java.util.List;
@Schema(title = "App - 商品spu分页 Request VO")
@Schema(description = "App - 商品spu分页 Request VO")
@Data
public class AppSpuPageRespVO {
@Schema(title = "主键", required = true, example = "1")
@Schema(description = "主键", required = true, example = "1")
private Long id;
@Schema(title = "商品名称")
@Schema(description = "商品名称")
private String name;
@Schema(title = "卖点", required = true)
@Schema(description = "卖点", required = true)
@NotNull(message = "卖点不能为空")
private String sellPoint;
@Schema(title = "描述", required = true)
@Schema(description = "描述", required = true)
@NotNull(message = "描述不能为空")
private String description;
@Schema(title = "分类id", required = true)
@Schema(description = "分类id", required = true)
@NotNull(message = "分类id不能为空")
private Long categoryId;
@Schema(title = "商品主图地址,* 数组,以逗号分隔,最多上传15张", required = true)
@Schema(description = "商品主图地址,* 数组,以逗号分隔,最多上传15张", required = true)
@NotNull(message = "商品主图地址,* 数组,以逗号分隔,最多上传15张不能为空")
private List<String> picUrls;
@Schema(title = "排序字段", required = true)
@Schema(description = "排序字段", required = true)
@NotNull(message = "排序字段不能为空")
private Integer sort;
@Schema(title = "点赞初始人数")
@Schema(description = "点赞初始人数")
private Integer likeCount;
@Schema(title = "价格 单位使用:分")
@Schema(description = "价格 单位使用:分")
private Integer price;
@Schema(title = "库存数量")
@Schema(description = "库存数量")
private Integer quantity;
@Schema(title = "上下架状态: 0 上架(开启) 1 下架(禁用)")
@Schema(description = "上下架状态: 0 上架(开启) 1 下架(禁用)")
private Integer status;
}

View File

@@ -12,7 +12,7 @@ import lombok.EqualsAndHashCode;
*
* @author LuoWenFeng
*/
@Schema(title = "App - 商品spu Response VO")
@Schema(description = "App - 商品spu Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
public class AppSpuRespVO extends ProductSpuRespVO {