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

@@ -3,20 +3,20 @@ package cn.iocoder.yudao.module.trade.controller.app.base.property;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
@Schema(title = "用户 App - 规格 + 规格值 Response VO")
@Schema(description = "用户 App - 规格 + 规格值 Response VO")
@Data
public class AppProductPropertyValueDetailRespVO {
@Schema(title = "属性的编号", required = true, example = "1")
@Schema(description = "属性的编号", required = true, example = "1")
private Long propertyId;
@Schema(title = "属性的名称", required = true, example = "颜色")
@Schema(description = "属性的名称", required = true, example = "颜色")
private String propertyName;
@Schema(title = "属性值的编号", required = true, example = "1024")
@Schema(description = "属性值的编号", required = true, example = "1024")
private Long valueId;
@Schema(title = "属性值的名称", required = true, example = "红色")
@Schema(description = "属性值的名称", required = true, example = "红色")
private String valueName;
}

View File

@@ -14,16 +14,16 @@ import java.util.List;
@Data
public class AppProductSkuBaseRespVO {
@Schema(title = "主键", required = true, example = "1024")
@Schema(description = "主键", required = true, example = "1024")
private Long id;
@Schema(title = "商品 SKU 名字", required = true, example = "芋道")
@Schema(description = "商品 SKU 名字", required = true, example = "芋道")
private String name;
@Schema(title = "图片地址", example = "https://www.iocoder.cn/xx.png")
@Schema(description = "图片地址", example = "https://www.iocoder.cn/xx.png")
private String picUrl;
@Schema(title = "库存", required = true, example = "1")
@Schema(description = "库存", required = true, example = "1")
private Integer stock;
/**

View File

@@ -12,13 +12,13 @@ import java.util.List;
@Data
public class AppProductSpuBaseRespVO {
@Schema(title = "主键", required = true, example = "1024")
@Schema(description = "主键", required = true, example = "1024")
private Long id;
@Schema(title = "商品 SPU 名字", required = true, example = "芋道")
@Schema(description = "商品 SPU 名字", required = true, example = "芋道")
private String name;
@Schema(title = "商品主图地址", example = "https://www.iocoder.cn/xx.png")
@Schema(description = "商品主图地址", example = "https://www.iocoder.cn/xx.png")
private List<String> picUrls;
}

View File

@@ -6,7 +6,7 @@ import lombok.Data;
import java.util.List;
@Schema(title = "用户 App - 用户的购物车明细 Response VO")
@Schema(description = "用户 App - 用户的购物车明细 Response VO")
@Data
public class AppTradeCartDetailRespVO {
@@ -20,7 +20,7 @@ public class AppTradeCartDetailRespVO {
*/
private Order order;
@Schema(title = "商品分组", description = "多个商品,参加同一个活动,从而形成分组")
@Schema(description = "商品分组,多个商品,参加同一个活动,从而形成分组")
@Data
public static class ItemGroup {
@@ -35,7 +35,7 @@ public class AppTradeCartDetailRespVO {
}
@Schema(title = "商品 SKU")
@Schema(description = "商品 SKU")
@Data
public static class Sku extends AppProductSkuBaseRespVO {
@@ -46,26 +46,26 @@ public class AppTradeCartDetailRespVO {
// ========== 购物车相关的字段 ==========
@Schema(title = "商品数量", required = true, example = "1")
@Schema(description = "商品数量", required = true, example = "1")
private Integer count;
@Schema(title = "是否选中", required = true, example = "true")
@Schema(description = "是否选中", required = true, example = "true")
private Boolean selected;
// ========== 价格相关的字段,对应 PriceCalculateRespDTO.OrderItem 的属性 ==========
// TODO 芋艿:后续可以去除一些无用的字段
@Schema(title = "商品原价(单)", required = true, example = "100")
@Schema(description = "商品原价(单)", required = true, example = "100")
private Integer originalPrice;
@Schema(title = "商品原价(总)", required = true, example = "200")
@Schema(description = "商品原价(总)", required = true, example = "200")
private Integer totalOriginalPrice;
@Schema(title = "商品级优惠(总)", required = true, example = "300")
@Schema(description = "商品级优惠(总)", required = true, example = "300")
private Integer totalPromotionPrice;
@Schema(title = "最终购买金额(总)", required = true, example = "400")
@Schema(description = "最终购买金额(总)", required = true, example = "400")
private Integer totalPresentPrice;
@Schema(title = "最终购买金额(单)", required = true, example = "500")
@Schema(description = "最终购买金额(单)", required = true, example = "500")
private Integer presentPrice;
@Schema(title = "应付金额(总)", required = true, example = "600")
@Schema(description = "应付金额(总)", required = true, example = "600")
private Integer totalPayPrice;
// ========== 营销相关的字段 ==========
@@ -76,40 +76,40 @@ public class AppTradeCartDetailRespVO {
}
@Schema(title = "订单", description = "对应 PriceCalculateRespDTO.Order 类,用于费用(合计)")
@Schema(description = "订单,对应 PriceCalculateRespDTO.Order 类,用于费用(合计)")
@Data
public static class Order {
// TODO 芋艿:后续可以去除一些无用的字段
@Schema(title = "商品原价(总)", required = true, example = "100")
@Schema(description = "商品原价(总)", required = true, example = "100")
private Integer skuOriginalPrice;
@Schema(title = "商品优惠(总)", required = true, example = "200")
@Schema(description = "商品优惠(总)", required = true, example = "200")
private Integer skuPromotionPrice;
@Schema(title = "订单优惠(总)", required = true, example = "300")
@Schema(description = "订单优惠(总)", required = true, example = "300")
private Integer orderPromotionPrice;
@Schema(title = "运费金额", required = true, example = "400")
@Schema(description = "运费金额", required = true, example = "400")
private Integer deliveryPrice;
@Schema(title = "应付金额(总)", required = true, example = "500")
@Schema(description = "应付金额(总)", required = true, example = "500")
private Integer payPrice;
}
@Schema(title = "营销活动", description = "对应 PriceCalculateRespDTO.Promotion 类的属性")
@Schema(description = "营销活动,对应 PriceCalculateRespDTO.Promotion 类的属性")
@Data
public static class Promotion {
@Schema(title = "营销编号", required = true, example = "1024", description = "营销活动的编号、优惠劵的编号")
@Schema(description = "营销编号,营销活动的编号、优惠劵的编号", required = true, example = "1024")
private Long id;
@Schema(title = "营销名字", required = true, example = "xx 活动")
@Schema(description = "营销名字", required = true, example = "xx 活动")
private String name;
@Schema(title = "营销类型", required = true, example = "1", description = "参见 PromotionTypeEnum 枚举类")
@Schema(description = "营销类型,参见 PromotionTypeEnum 枚举类", required = true, example = "1")
private Integer type;
// ========== 匹配情况 ==========
@Schema(title = "是否满足优惠条件", required = true, example = "true")
@Schema(description = "是否满足优惠条件", required = true, example = "true")
private Boolean meet;
@Schema(title = "满足条件的提示", required = true, example = "圣诞价:省 150.00 元")
@Schema(description = "满足条件的提示", required = true, example = "圣诞价:省 150.00 元")
private String meetTip;
}

View File

@@ -6,15 +6,15 @@ import lombok.Data;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
@Schema(title = "用户 App - 购物车添加购物项 Request VO")
@Schema(description = "用户 App - 购物车添加购物项 Request VO")
@Data
public class AppTradeCartItemAddCountReqVO {
@Schema(title = "商品 SKU 编号", required = true,example = "1024")
@Schema(description = "商品 SKU 编号", required = true,example = "1024")
@NotNull(message = "商品 SKU 编号不能为空")
private Long skuId;
@Schema(title = "商品数量", required = true, example = "1", description = "注意,这是新增数量")
@Schema(description = "商品数量,注意,这是新增数量", required = true, example = "1")
@NotNull(message = "数量不能为空")
@Min(message = "数量必须大于 0", value = 1L)
private Integer count;

View File

@@ -6,15 +6,15 @@ import lombok.Data;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
@Schema(title = "用户 App - 购物车更新数量 Request VO")
@Schema(description = "用户 App - 购物车更新数量 Request VO")
@Data
public class AppTradeCartItemUpdateCountReqVO {
@Schema(title = "商品 SKU 编号", required = true, example = "1024")
@Schema(description = "商品 SKU 编号", required = true, example = "1024")
@NotNull(message = "商品 SKU 编号不能为空")
private Long skuId;
@Schema(title = "商品数量", required = true, example = "1")
@Schema(description = "商品数量", required = true, example = "1")
@NotNull(message = "数量不能为空")
@Min(message = "数量必须大于 0", value = 1L)
private Integer count;

View File

@@ -6,15 +6,15 @@ import lombok.Data;
import javax.validation.constraints.NotNull;
import java.util.Collection;
@Schema(title = "用户 App - 购物车更新是否选中 Request VO")
@Schema(description = "用户 App - 购物车更新是否选中 Request VO")
@Data
public class AppTradeCartItemUpdateSelectedReqVO {
@Schema(title = "商品 SKU 编号列表", required = true, example = "1024,2048")
@Schema(description = "商品 SKU 编号列表", required = true, example = "1024,2048")
@NotNull(message = "商品 SKU 编号列表不能为空")
private Collection<Long> skuIds;
@Schema(title = "是否选中", required = true, example = "true")
@Schema(description = "是否选中", required = true, example = "true")
@NotNull(message = "是否选中不能为空")
private Boolean selected;

View File

@@ -8,21 +8,21 @@ import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;
@Schema(title = "用户 App - 交易订单创建 Request VO")
@Schema(description = "用户 App - 交易订单创建 Request VO")
@Data
public class AppTradeOrderCreateReqVO {
@Schema(name = "收件地址编号", required = true, example = "1")
@Schema(description = "收件地址编号", required = true, example = "1")
@NotNull(message = "收件地址不能为空")
private Long addressId;
@Schema(name = "优惠劵编号", example = "1024")
@Schema(description = "优惠劵编号", example = "1024")
private Long couponId;
@Schema(name = "备注", example = "这个是我的订单哟")
@Schema(description = "备注", example = "这个是我的订单哟")
private String remark;
@Schema(name = "是否来自购物车", required = true, example = "true", description = "true - 来自购物车false - 立即购买")
@Schema(description = "是否来自购物车,true - 来自购物车false - 立即购买", required = true, example = "true")
@NotNull(message = "是否来自购物车不能为空")
private Boolean fromCart;
@@ -32,15 +32,15 @@ public class AppTradeOrderCreateReqVO {
@NotEmpty(message = "必须选择购买的商品")
private List<Item> items;
@Schema(title = "订单商品项")
@Schema(description = "订单商品项")
@Data
public static class Item {
@Schema(name = "商品 SKU 编号", required = true, example = "111")
@Schema(description = "商品 SKU 编号", required = true, example = "111")
@NotNull(message = "商品 SKU 编号不能为空")
private Long skuId;
@Schema(name = "商品 SKU 购买数量", required = true, example = "1024")
@Schema(description = "商品 SKU 购买数量", required = true, example = "1024")
@NotNull(message = "商品 SKU 购买数量不能为空")
@Min(value = 1, message = "商品 SKU 购买数量必须大于 0")
private Integer count;

View File

@@ -6,7 +6,7 @@ import lombok.Data;
import java.util.List;
@Schema(title = "用户 App - 订单获得创建信息 Response VO")
@Schema(description = "用户 App - 订单获得创建信息 Response VO")
@Data
public class AppTradeOrderGetCreateInfoRespVO {
@@ -24,7 +24,7 @@ public class AppTradeOrderGetCreateInfoRespVO {
// */
// private List<CouponCardAvailableRespDTO> coupons;
@Schema(title = "商品分组", description = "多个商品,参加同一个活动,从而形成分组")
@Schema(description = "商品分组,多个商品,参加同一个活动,从而形成分组")
@Data
public static class ItemGroup {
@@ -39,12 +39,12 @@ public class AppTradeOrderGetCreateInfoRespVO {
}
@Schema(title = "商品 SKU")
@Schema(description = "商品 SKU")
@Data
public static class Sku {
// SKU 自带信息
@Schema(title = "SKU 编号", required = true, example = "1024")
@Schema(description = "SKU 编号", required = true, example = "1024")
private Integer id;
/**
* SPU 信息
@@ -139,12 +139,12 @@ public class AppTradeOrderGetCreateInfoRespVO {
}
@Schema(title = "费用(合计)")
@Schema(description = "费用(合计)")
@Data
@AllArgsConstructor
public static class Fee {
@Schema(title = "购买总价", required = true, example = "1024")
@Schema(description = "购买总价", required = true, example = "1024")
private Integer buyPrice;
/**
* 优惠总价

View File

@@ -5,47 +5,47 @@ import lombok.Data;
import java.time.LocalDateTime;
@Schema(title = "交易订单项 Response VO")
@Schema(description = "交易订单项 Response VO")
@Data
public class TradeOrderItemRespVO {
@Schema(title = "id自增长", required = true)
@Schema(description = "id自增长", required = true)
private Integer id;
@Schema(title = "订单编号", required = true)
@Schema(description = "订单编号", required = true)
private Integer orderId;
@Schema(title = "订单项状态", required = true)
@Schema(description = "订单项状态", required = true)
private Integer status;
@Schema(title = "商品 SKU 编号", required = true)
@Schema(description = "商品 SKU 编号", required = true)
private Integer skuId;
@Schema(title = "商品 SPU 编号", required = true)
@Schema(description = "商品 SPU 编号", required = true)
private Integer spuId;
@Schema(title = "商品名字", required = true)
@Schema(description = "商品名字", required = true)
private String skuName;
@Schema(title = "图片名字", required = true)
@Schema(description = "图片名字", required = true)
private String skuImage;
@Schema(title = "商品数量", required = true)
@Schema(description = "商品数量", required = true)
private Integer quantity;
@Schema(title = "原始单价,单位:分", required = true)
@Schema(description = "原始单价,单位:分", required = true)
private Integer originPrice;
@Schema(title = "购买单价,单位:分", required = true)
@Schema(description = "购买单价,单位:分", required = true)
private Integer buyPrice;
@Schema(title = "最终价格,单位:分", required = true)
@Schema(description = "最终价格,单位:分", required = true)
private Integer presentPrice;
@Schema(title = "购买总金额,单位:分", required = true)
@Schema(description = "购买总金额,单位:分", required = true)
private Integer buyTotal;
@Schema(title = "优惠总金额,单位:分", required = true)
@Schema(description = "优惠总金额,单位:分", required = true)
private Integer discountTotal;
@Schema(title = "最终总金额,单位:分", required = true)
@Schema(description = "最终总金额,单位:分", required = true)
private Integer presentTotal;
@Schema(title = "退款总金额,单位:分", required = true)
@Schema(description = "退款总金额,单位:分", required = true)
private Integer refundTotal;
@Schema(title = "物流id")
@Schema(description = "物流id")
private Integer logisticsId;
@Schema(title = "售后状态", required = true)
@Schema(description = "售后状态", required = true)
private Integer afterSaleStatus;
@Schema(title = "售后订单编号")
@Schema(description = "售后订单编号")
private Integer afterSaleOrderId;
@Schema(title = "创建时间", required = true)
@Schema(description = "创建时间", required = true)
private LocalDateTime createTime;

View File

@@ -5,12 +5,12 @@ import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
@Schema(title = "交易订单分页 Request VO")
@Schema(description = "交易订单分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
public class TradeOrderPageReqVO extends PageParam {
@Schema(title = "订单状态", example = "1", description = "参见 TradeOrderStatusEnum 枚举")
@Schema(description = "订单状态-参见 TradeOrderStatusEnum 枚举", example = "1")
private Integer orderStatus;
}

View File

@@ -5,59 +5,59 @@ import lombok.*;
import java.time.LocalDateTime;
import java.util.*;
@Schema(title = "订单交易 Response VO")
@Schema(description = "订单交易 Response VO")
@Data
public class TradeOrderRespVO {
@Schema(title = "订单编号", required = true)
@Schema(description = "订单编号", required = true)
private Integer id;
@Schema(title = "用户编号", required = true)
@Schema(description = "用户编号", required = true)
private Integer userId;
@Schema(title = "订单单号", required = true)
@Schema(description = "订单单号", required = true)
private String orderNo;
@Schema(title = "订单状态", required = true)
@Schema(description = "订单状态", required = true)
private Integer orderStatus;
@Schema(title = "备注")
@Schema(description = "备注")
private String remark;
@Schema(title = "订单结束时间")
@Schema(description = "订单结束时间")
private LocalDateTime endTime;
@Schema(title = "订单金额(总金额),单位:分", required = true)
@Schema(description = "订单金额(总金额),单位:分", required = true)
private Integer buyPrice;
@Schema(title = "优惠总金额,单位:分", required = true)
@Schema(description = "优惠总金额,单位:分", required = true)
private Integer discountPrice;
@Schema(title = "物流金额,单位:分", required = true)
@Schema(description = "物流金额,单位:分", required = true)
private Integer logisticsPrice;
@Schema(title = "最终金额,单位:分", required = true)
@Schema(description = "最终金额,单位:分", required = true)
private Integer presentPrice;
@Schema(title = "支付金额,单位:分", required = true)
@Schema(description = "支付金额,单位:分", required = true)
private Integer payPrice;
@Schema(title = "退款金额,单位:分", required = true)
@Schema(description = "退款金额,单位:分", required = true)
private Integer refundPrice;
@Schema(title = "付款时间")
@Schema(description = "付款时间")
private LocalDateTime payTime;
@Schema(title = "支付订单编号")
@Schema(description = "支付订单编号")
private Integer payTransactionId;
@Schema(title = "支付渠道")
@Schema(description = "支付渠道")
private Integer payChannel;
@Schema(title = "配送类型", required = true)
@Schema(description = "配送类型", required = true)
private Integer deliveryType;
@Schema(title = "发货时间")
@Schema(description = "发货时间")
private LocalDateTime deliveryTime;
@Schema(title = "收货时间")
@Schema(description = "收货时间")
private LocalDateTime receiveTime;
@Schema(title = "收件人名称", required = true)
@Schema(description = "收件人名称", required = true)
private String receiverName;
@Schema(title = "手机号", required = true)
@Schema(description = "手机号", required = true)
private String receiverMobile;
@Schema(title = "地区编码", required = true)
@Schema(description = "地区编码", required = true)
private Integer receiverAreaCode;
@Schema(title = "收件详细地址", required = true)
@Schema(description = "收件详细地址", required = true)
private String receiverDetailAddress;
@Schema(title = "售后状态", required = true)
@Schema(description = "售后状态", required = true)
private Integer afterSaleStatus;
@Schema(title = "优惠劵编号")
@Schema(description = "优惠劵编号")
private Integer couponCardId;
@Schema(title = "创建时间", required = true)
@Schema(description = "创建时间", required = true)
private LocalDateTime createTime;
/**