mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-08-14 18:21:53 +08:00
refactor: springdoc 替换 springfox
This commit is contained in:
@@ -1,23 +1,22 @@
|
||||
package cn.iocoder.yudao.module.trade.controller.app.base.property;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@ApiModel("用户 App - 规格 + 规格值 Response VO")
|
||||
@Schema(title = "用户 App - 规格 + 规格值 Response VO")
|
||||
@Data
|
||||
public class AppProductPropertyValueDetailRespVO {
|
||||
|
||||
@ApiModelProperty(value = "属性的编号", required = true, example = "1")
|
||||
@Schema(title = "属性的编号", required = true, example = "1")
|
||||
private Long propertyId;
|
||||
|
||||
@ApiModelProperty(value = "属性的名称", required = true, example = "颜色")
|
||||
@Schema(title = "属性的名称", required = true, example = "颜色")
|
||||
private String propertyName;
|
||||
|
||||
@ApiModelProperty(value = "属性值的编号", required = true, example = "1024")
|
||||
@Schema(title = "属性值的编号", required = true, example = "1024")
|
||||
private Long valueId;
|
||||
|
||||
@ApiModelProperty(value = "属性值的名称", required = true, example = "红色")
|
||||
@Schema(title = "属性值的名称", required = true, example = "红色")
|
||||
private String valueName;
|
||||
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package cn.iocoder.yudao.module.trade.controller.app.base.sku;
|
||||
|
||||
import cn.iocoder.yudao.module.trade.controller.app.base.property.AppProductPropertyValueDetailRespVO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
@@ -14,16 +14,16 @@ import java.util.List;
|
||||
@Data
|
||||
public class AppProductSkuBaseRespVO {
|
||||
|
||||
@ApiModelProperty(value = "主键", required = true, example = "1024")
|
||||
@Schema(title = "主键", required = true, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "商品 SKU 名字", required = true, example = "芋道")
|
||||
@Schema(title = "商品 SKU 名字", required = true, example = "芋道")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "图片地址", example = "https://www.iocoder.cn/xx.png")
|
||||
@Schema(title = "图片地址", example = "https://www.iocoder.cn/xx.png")
|
||||
private String picUrl;
|
||||
|
||||
@ApiModelProperty(value = "库存", required = true, example = "1")
|
||||
@Schema(title = "库存", required = true, example = "1")
|
||||
private Integer stock;
|
||||
|
||||
/**
|
||||
|
@@ -1,6 +1,5 @@
|
||||
package cn.iocoder.yudao.module.trade.controller.app.base.spu;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
@@ -13,13 +12,13 @@ import java.util.List;
|
||||
@Data
|
||||
public class AppProductSpuBaseRespVO {
|
||||
|
||||
@ApiModelProperty(value = "主键", required = true, example = "1024")
|
||||
@Schema(title = "主键", required = true, example = "1024")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "商品 SPU 名字", required = true, example = "芋道")
|
||||
@Schema(title = "商品 SPU 名字", required = true, example = "芋道")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "商品主图地址", example = "https://www.iocoder.cn/xx.png")
|
||||
@Schema(title = "商品主图地址", example = "https://www.iocoder.cn/xx.png")
|
||||
private List<String> picUrls;
|
||||
|
||||
}
|
||||
|
@@ -7,9 +7,9 @@ import cn.iocoder.yudao.module.trade.controller.app.cart.vo.AppTradeCartItemAddC
|
||||
import cn.iocoder.yudao.module.trade.controller.app.cart.vo.AppTradeCartItemUpdateCountReqVO;
|
||||
import cn.iocoder.yudao.module.trade.controller.app.cart.vo.AppTradeCartItemUpdateSelectedReqVO;
|
||||
import cn.iocoder.yudao.module.trade.service.cart.TradeCartService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@@ -22,7 +22,7 @@ import java.util.List;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
|
||||
|
||||
@Api(tags = "用户 App - 购物车")
|
||||
@Tag(name = "用户 App - 购物车")
|
||||
@RestController
|
||||
@RequestMapping("/trade/cart")
|
||||
@RequiredArgsConstructor
|
||||
@@ -34,7 +34,7 @@ public class TradeCartController {
|
||||
private TradeCartService cartService;
|
||||
|
||||
@PostMapping("/add-count")
|
||||
@ApiOperation("添加商品到购物车")
|
||||
@Operation(summary = "添加商品到购物车")
|
||||
@PreAuthenticated
|
||||
public CommonResult<Boolean> addCartItemCount(@Valid @RequestBody AppTradeCartItemAddCountReqVO addCountReqVO) {
|
||||
cartService.addCartItemCount(getLoginUserId(), addCountReqVO);
|
||||
@@ -42,7 +42,7 @@ public class TradeCartController {
|
||||
}
|
||||
|
||||
@PutMapping("update-count")
|
||||
@ApiOperation("更新购物车商品数量")
|
||||
@Operation(summary = "更新购物车商品数量")
|
||||
@PreAuthenticated
|
||||
public CommonResult<Boolean> updateCartItemQuantity(@Valid @RequestBody AppTradeCartItemUpdateCountReqVO updateCountReqVO) {
|
||||
cartService.updateCartItemCount(getLoginUserId(), updateCountReqVO);
|
||||
@@ -50,7 +50,7 @@ public class TradeCartController {
|
||||
}
|
||||
|
||||
@PutMapping("update-selected")
|
||||
@ApiOperation("更新购物车商品是否选中")
|
||||
@Operation(summary = "更新购物车商品是否选中")
|
||||
@PreAuthenticated
|
||||
public CommonResult<Boolean> updateCartItemSelected(@Valid @RequestBody AppTradeCartItemUpdateSelectedReqVO updateSelectedReqVO) {
|
||||
cartService.updateCartItemSelected(getLoginUserId(), updateSelectedReqVO);
|
||||
@@ -59,8 +59,8 @@ public class TradeCartController {
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@ApiOperation("删除购物车商品")
|
||||
@ApiImplicitParam(name = "skuIds", value = "商品 SKU 编号的数组", required = true, example = "1024,2048", dataTypeClass = List.class)
|
||||
@Operation(summary = "删除购物车商品")
|
||||
@Parameter(name = "skuIds", description = "商品 SKU 编号的数组", required = true, example = "1024,2048")
|
||||
@PreAuthenticated
|
||||
public CommonResult<Boolean> deleteCartItem(@RequestParam("skuIds") List<Long> skuIds) {
|
||||
cartService.deleteCartItems(getLoginUserId(), skuIds);
|
||||
@@ -68,14 +68,14 @@ public class TradeCartController {
|
||||
}
|
||||
|
||||
@GetMapping("get-count")
|
||||
@ApiOperation("查询用户在购物车中的商品数量")
|
||||
@Operation(summary = "查询用户在购物车中的商品数量")
|
||||
@PreAuthenticated
|
||||
public CommonResult<Integer> getCartCount() {
|
||||
return success(cartService.getCartCount(getLoginUserId()));
|
||||
}
|
||||
|
||||
@GetMapping("/get-detail")
|
||||
@ApiOperation("查询用户的购物车的详情")
|
||||
@Operation(summary = "查询用户的购物车的详情")
|
||||
@PreAuthenticated
|
||||
public CommonResult<AppTradeCartDetailRespVO> getCartDetail() {
|
||||
return success(cartService.getCartDetail(getLoginUserId()));
|
||||
|
@@ -1,13 +1,12 @@
|
||||
package cn.iocoder.yudao.module.trade.controller.app.cart.vo;
|
||||
|
||||
import cn.iocoder.yudao.module.trade.controller.app.base.sku.AppProductSkuBaseRespVO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ApiModel(value = "用户 App - 用户的购物车明细 Response VO")
|
||||
@Schema(title = "用户 App - 用户的购物车明细 Response VO")
|
||||
@Data
|
||||
public class AppTradeCartDetailRespVO {
|
||||
|
||||
@@ -21,7 +20,7 @@ public class AppTradeCartDetailRespVO {
|
||||
*/
|
||||
private Order order;
|
||||
|
||||
@ApiModel(value = "商品分组", description = "多个商品,参加同一个活动,从而形成分组")
|
||||
@Schema(title = "商品分组", description = "多个商品,参加同一个活动,从而形成分组")
|
||||
@Data
|
||||
public static class ItemGroup {
|
||||
|
||||
@@ -36,7 +35,7 @@ public class AppTradeCartDetailRespVO {
|
||||
|
||||
}
|
||||
|
||||
@ApiModel(value = "商品 SKU")
|
||||
@Schema(title = "商品 SKU")
|
||||
@Data
|
||||
public static class Sku extends AppProductSkuBaseRespVO {
|
||||
|
||||
@@ -47,26 +46,26 @@ public class AppTradeCartDetailRespVO {
|
||||
|
||||
// ========== 购物车相关的字段 ==========
|
||||
|
||||
@ApiModelProperty(value = "商品数量", required = true, example = "1")
|
||||
@Schema(title = "商品数量", required = true, example = "1")
|
||||
private Integer count;
|
||||
@ApiModelProperty(value = "是否选中", required = true, example = "true")
|
||||
@Schema(title = "是否选中", required = true, example = "true")
|
||||
private Boolean selected;
|
||||
|
||||
// ========== 价格相关的字段,对应 PriceCalculateRespDTO.OrderItem 的属性 ==========
|
||||
|
||||
// TODO 芋艿:后续可以去除一些无用的字段
|
||||
|
||||
@ApiModelProperty(value = "商品原价(单)", required = true, example = "100")
|
||||
@Schema(title = "商品原价(单)", required = true, example = "100")
|
||||
private Integer originalPrice;
|
||||
@ApiModelProperty(value = "商品原价(总)", required = true, example = "200")
|
||||
@Schema(title = "商品原价(总)", required = true, example = "200")
|
||||
private Integer totalOriginalPrice;
|
||||
@ApiModelProperty(value = "商品级优惠(总)", required = true, example = "300")
|
||||
@Schema(title = "商品级优惠(总)", required = true, example = "300")
|
||||
private Integer totalPromotionPrice;
|
||||
@ApiModelProperty(value = "最终购买金额(总)", required = true, example = "400")
|
||||
@Schema(title = "最终购买金额(总)", required = true, example = "400")
|
||||
private Integer totalPresentPrice;
|
||||
@ApiModelProperty(value = "最终购买金额(单)", required = true, example = "500")
|
||||
@Schema(title = "最终购买金额(单)", required = true, example = "500")
|
||||
private Integer presentPrice;
|
||||
@ApiModelProperty(value = "应付金额(总)", required = true, example = "600")
|
||||
@Schema(title = "应付金额(总)", required = true, example = "600")
|
||||
private Integer totalPayPrice;
|
||||
|
||||
// ========== 营销相关的字段 ==========
|
||||
@@ -77,40 +76,40 @@ public class AppTradeCartDetailRespVO {
|
||||
|
||||
}
|
||||
|
||||
@ApiModel(value = "订单", description = "对应 PriceCalculateRespDTO.Order 类,用于费用(合计)")
|
||||
@Schema(title = "订单", description = "对应 PriceCalculateRespDTO.Order 类,用于费用(合计)")
|
||||
@Data
|
||||
public static class Order {
|
||||
|
||||
// TODO 芋艿:后续可以去除一些无用的字段
|
||||
|
||||
@ApiModelProperty(value = "商品原价(总)", required = true, example = "100")
|
||||
@Schema(title = "商品原价(总)", required = true, example = "100")
|
||||
private Integer skuOriginalPrice;
|
||||
@ApiModelProperty(value = "商品优惠(总)", required = true, example = "200")
|
||||
@Schema(title = "商品优惠(总)", required = true, example = "200")
|
||||
private Integer skuPromotionPrice;
|
||||
@ApiModelProperty(value = "订单优惠(总)", required = true, example = "300")
|
||||
@Schema(title = "订单优惠(总)", required = true, example = "300")
|
||||
private Integer orderPromotionPrice;
|
||||
@ApiModelProperty(value = "运费金额", required = true, example = "400")
|
||||
@Schema(title = "运费金额", required = true, example = "400")
|
||||
private Integer deliveryPrice;
|
||||
@ApiModelProperty(value = "应付金额(总)", required = true, example = "500")
|
||||
@Schema(title = "应付金额(总)", required = true, example = "500")
|
||||
private Integer payPrice;
|
||||
|
||||
}
|
||||
|
||||
@ApiModel(value = "营销活动", description = "对应 PriceCalculateRespDTO.Promotion 类的属性")
|
||||
@Schema(title = "营销活动", description = "对应 PriceCalculateRespDTO.Promotion 类的属性")
|
||||
@Data
|
||||
public static class Promotion {
|
||||
|
||||
@ApiModelProperty(value = "营销编号", required = true, example = "1024", notes = "营销活动的编号、优惠劵的编号")
|
||||
@Schema(title = "营销编号", required = true, example = "1024", description = "营销活动的编号、优惠劵的编号")
|
||||
private Long id;
|
||||
@ApiModelProperty(value = "营销名字", required = true, example = "xx 活动")
|
||||
@Schema(title = "营销名字", required = true, example = "xx 活动")
|
||||
private String name;
|
||||
@ApiModelProperty(value = "营销类型", required = true, example = "1", notes = "参见 PromotionTypeEnum 枚举类")
|
||||
@Schema(title = "营销类型", required = true, example = "1", description = "参见 PromotionTypeEnum 枚举类")
|
||||
private Integer type;
|
||||
|
||||
// ========== 匹配情况 ==========
|
||||
@ApiModelProperty(value = "是否满足优惠条件", required = true, example = "true")
|
||||
@Schema(title = "是否满足优惠条件", required = true, example = "true")
|
||||
private Boolean meet;
|
||||
@ApiModelProperty(value = "满足条件的提示", required = true, example = "圣诞价:省 150.00 元")
|
||||
@Schema(title = "满足条件的提示", required = true, example = "圣诞价:省 150.00 元")
|
||||
private String meetTip;
|
||||
|
||||
}
|
||||
|
@@ -1,21 +1,20 @@
|
||||
package cn.iocoder.yudao.module.trade.controller.app.cart.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@ApiModel(value = "用户 App - 购物车添加购物项 Request VO")
|
||||
@Schema(title = "用户 App - 购物车添加购物项 Request VO")
|
||||
@Data
|
||||
public class AppTradeCartItemAddCountReqVO {
|
||||
|
||||
@ApiModelProperty(value = "商品 SKU 编号", required = true,example = "1024")
|
||||
@Schema(title = "商品 SKU 编号", required = true,example = "1024")
|
||||
@NotNull(message = "商品 SKU 编号不能为空")
|
||||
private Long skuId;
|
||||
|
||||
@ApiModelProperty(value = "商品数量", required = true, example = "1", notes = "注意,这是新增数量")
|
||||
@Schema(title = "商品数量", required = true, example = "1", description = "注意,这是新增数量")
|
||||
@NotNull(message = "数量不能为空")
|
||||
@Min(message = "数量必须大于 0", value = 1L)
|
||||
private Integer count;
|
||||
|
@@ -1,21 +1,20 @@
|
||||
package cn.iocoder.yudao.module.trade.controller.app.cart.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
@ApiModel(value = "用户 App - 购物车更新数量 Request VO")
|
||||
@Schema(title = "用户 App - 购物车更新数量 Request VO")
|
||||
@Data
|
||||
public class AppTradeCartItemUpdateCountReqVO {
|
||||
|
||||
@ApiModelProperty(value = "商品 SKU 编号", required = true, example = "1024")
|
||||
@Schema(title = "商品 SKU 编号", required = true, example = "1024")
|
||||
@NotNull(message = "商品 SKU 编号不能为空")
|
||||
private Long skuId;
|
||||
|
||||
@ApiModelProperty(value = "商品数量", required = true, example = "1")
|
||||
@Schema(title = "商品数量", required = true, example = "1")
|
||||
@NotNull(message = "数量不能为空")
|
||||
@Min(message = "数量必须大于 0", value = 1L)
|
||||
private Integer count;
|
||||
|
@@ -1,21 +1,20 @@
|
||||
package cn.iocoder.yudao.module.trade.controller.app.cart.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Collection;
|
||||
|
||||
@ApiModel(value = "用户 App - 购物车更新是否选中 Request VO")
|
||||
@Schema(title = "用户 App - 购物车更新是否选中 Request VO")
|
||||
@Data
|
||||
public class AppTradeCartItemUpdateSelectedReqVO {
|
||||
|
||||
@ApiModelProperty(value = "商品 SKU 编号列表", required = true, example = "1024,2048")
|
||||
@Schema(title = "商品 SKU 编号列表", required = true, example = "1024,2048")
|
||||
@NotNull(message = "商品 SKU 编号列表不能为空")
|
||||
private Collection<Long> skuIds;
|
||||
|
||||
@ApiModelProperty(value = "是否选中", required = true, example = "true")
|
||||
@Schema(title = "是否选中", required = true, example = "true")
|
||||
@NotNull(message = "是否选中不能为空")
|
||||
private Boolean selected;
|
||||
|
||||
|
@@ -10,9 +10,9 @@ import cn.iocoder.yudao.module.trade.controller.app.order.vo.AppTradeOrderGetCre
|
||||
import cn.iocoder.yudao.module.trade.controller.app.order.vo.TradeOrderPageReqVO;
|
||||
import cn.iocoder.yudao.module.trade.controller.app.order.vo.TradeOrderRespVO;
|
||||
import cn.iocoder.yudao.module.trade.service.order.TradeOrderService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@@ -20,7 +20,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
@Api(tags = "用户 App - 交易订单")
|
||||
@Tag(name = "用户 App - 交易订单")
|
||||
@RestController
|
||||
@RequestMapping("/trade/order")
|
||||
@RequiredArgsConstructor // TODO @LeeYan9: 先统一使用 @Resource 注入哈; 项目只有三层, 依赖注入会存在, 所以使用 @Resource; 也因此, 最好全局保持一致
|
||||
@@ -31,7 +31,7 @@ public class AppTradeOrderController {
|
||||
private final TradeOrderService tradeOrderService;
|
||||
|
||||
@GetMapping("/get-create-info")
|
||||
@ApiOperation("基于商品,确认创建订单")
|
||||
@Operation(summary = "基于商品,确认创建订单")
|
||||
@PreAuthenticated
|
||||
public CommonResult<AppTradeOrderGetCreateInfoRespVO> getTradeOrderCreateInfo(AppTradeOrderCreateReqVO createReqVO) {
|
||||
// return success(tradeOrderService.getOrderConfirmCreateInfo(UserSecurityContextHolder.getUserId(), skuId, quantity, couponCardId));
|
||||
@@ -39,7 +39,7 @@ public class AppTradeOrderController {
|
||||
}
|
||||
|
||||
@PostMapping("/create")
|
||||
@ApiOperation("创建订单")
|
||||
@Operation(summary = "创建订单")
|
||||
@PreAuthenticated
|
||||
public CommonResult<Long> createTradeOrder(@RequestBody AppTradeOrderCreateReqVO createReqVO,
|
||||
HttpServletRequest servletRequest) {
|
||||
@@ -52,15 +52,15 @@ public class AppTradeOrderController {
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@ApiOperation("获得交易订单")
|
||||
@ApiImplicitParam(name = "tradeOrderId", value = "交易订单编号", required = true, dataTypeClass = Long.class)
|
||||
@Operation(summary = "获得交易订单")
|
||||
@Parameter(name = "tradeOrderId", description = "交易订单编号", required = true)
|
||||
public CommonResult<TradeOrderRespVO> getTradeOrder(@RequestParam("tradeOrderId") Integer tradeOrderId) {
|
||||
// return success(tradeOrderService.getTradeOrder(tradeOrderId));
|
||||
return null;
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@ApiOperation("获得订单交易分页")
|
||||
@Operation(summary = "获得订单交易分页")
|
||||
public CommonResult<PageResult<TradeOrderRespVO>> pageTradeOrder(TradeOrderPageReqVO pageVO) {
|
||||
// return success(tradeOrderService.pageTradeOrder(UserSecurityContextHolder.getUserId(), pageVO));
|
||||
return null;
|
||||
|
@@ -1,7 +1,6 @@
|
||||
package cn.iocoder.yudao.module.trade.controller.app.order.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
@@ -9,21 +8,21 @@ import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
@ApiModel(value = "用户 App - 交易订单创建 Request VO")
|
||||
@Schema(title = "用户 App - 交易订单创建 Request VO")
|
||||
@Data
|
||||
public class AppTradeOrderCreateReqVO {
|
||||
|
||||
@ApiModelProperty(name = "收件地址编号", required = true, example = "1")
|
||||
@Schema(name = "收件地址编号", required = true, example = "1")
|
||||
@NotNull(message = "收件地址不能为空")
|
||||
private Long addressId;
|
||||
|
||||
@ApiModelProperty(name = "优惠劵编号", example = "1024")
|
||||
@Schema(name = "优惠劵编号", example = "1024")
|
||||
private Long couponId;
|
||||
|
||||
@ApiModelProperty(name = "备注", example = "这个是我的订单哟")
|
||||
@Schema(name = "备注", example = "这个是我的订单哟")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty(name = "是否来自购物车", required = true, example = "true", notes = "true - 来自购物车;false - 立即购买")
|
||||
@Schema(name = "是否来自购物车", required = true, example = "true", description = "true - 来自购物车;false - 立即购买")
|
||||
@NotNull(message = "是否来自购物车不能为空")
|
||||
private Boolean fromCart;
|
||||
|
||||
@@ -33,15 +32,15 @@ public class AppTradeOrderCreateReqVO {
|
||||
@NotEmpty(message = "必须选择购买的商品")
|
||||
private List<Item> items;
|
||||
|
||||
@ApiModel(value = "订单商品项")
|
||||
@Schema(title = "订单商品项")
|
||||
@Data
|
||||
public static class Item {
|
||||
|
||||
@ApiModelProperty(name = "商品 SKU 编号", required = true, example = "111")
|
||||
@Schema(name = "商品 SKU 编号", required = true, example = "111")
|
||||
@NotNull(message = "商品 SKU 编号不能为空")
|
||||
private Long skuId;
|
||||
|
||||
@ApiModelProperty(name = "商品 SKU 购买数量", required = true, example = "1024")
|
||||
@Schema(name = "商品 SKU 购买数量", required = true, example = "1024")
|
||||
@NotNull(message = "商品 SKU 购买数量不能为空")
|
||||
@Min(value = 1, message = "商品 SKU 购买数量必须大于 0")
|
||||
private Integer count;
|
||||
|
@@ -1,13 +1,12 @@
|
||||
package cn.iocoder.yudao.module.trade.controller.app.order.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ApiModel(value = "用户 App - 订单获得创建信息 Response VO")
|
||||
@Schema(title = "用户 App - 订单获得创建信息 Response VO")
|
||||
@Data
|
||||
public class AppTradeOrderGetCreateInfoRespVO {
|
||||
|
||||
@@ -25,7 +24,7 @@ public class AppTradeOrderGetCreateInfoRespVO {
|
||||
// */
|
||||
// private List<CouponCardAvailableRespDTO> coupons;
|
||||
|
||||
@ApiModel(value = "商品分组", description = "多个商品,参加同一个活动,从而形成分组")
|
||||
@Schema(title = "商品分组", description = "多个商品,参加同一个活动,从而形成分组")
|
||||
@Data
|
||||
public static class ItemGroup {
|
||||
|
||||
@@ -40,12 +39,12 @@ public class AppTradeOrderGetCreateInfoRespVO {
|
||||
|
||||
}
|
||||
|
||||
@ApiModel("商品 SKU")
|
||||
@Schema(title = "商品 SKU")
|
||||
@Data
|
||||
public static class Sku {
|
||||
|
||||
// SKU 自带信息
|
||||
@ApiModelProperty(value = "SKU 编号", required = true, example = "1024")
|
||||
@Schema(title = "SKU 编号", required = true, example = "1024")
|
||||
private Integer id;
|
||||
/**
|
||||
* SPU 信息
|
||||
@@ -140,12 +139,12 @@ public class AppTradeOrderGetCreateInfoRespVO {
|
||||
|
||||
}
|
||||
|
||||
@ApiModel("费用(合计)")
|
||||
@Schema(title = "费用(合计)")
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
public static class Fee {
|
||||
|
||||
@ApiModelProperty(value = "购买总价", required = true, example = "1024")
|
||||
@Schema(title = "购买总价", required = true, example = "1024")
|
||||
private Integer buyPrice;
|
||||
/**
|
||||
* 优惠总价
|
||||
|
@@ -1,52 +1,51 @@
|
||||
package cn.iocoder.yudao.module.trade.controller.app.order.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@ApiModel("交易订单项 Response VO")
|
||||
@Schema(title = "交易订单项 Response VO")
|
||||
@Data
|
||||
public class TradeOrderItemRespVO {
|
||||
|
||||
@ApiModelProperty(value = "id自增长", required = true)
|
||||
@Schema(title = "id自增长", required = true)
|
||||
private Integer id;
|
||||
@ApiModelProperty(value = "订单编号", required = true)
|
||||
@Schema(title = "订单编号", required = true)
|
||||
private Integer orderId;
|
||||
@ApiModelProperty(value = "订单项状态", required = true)
|
||||
@Schema(title = "订单项状态", required = true)
|
||||
private Integer status;
|
||||
@ApiModelProperty(value = "商品 SKU 编号", required = true)
|
||||
@Schema(title = "商品 SKU 编号", required = true)
|
||||
private Integer skuId;
|
||||
@ApiModelProperty(value = "商品 SPU 编号", required = true)
|
||||
@Schema(title = "商品 SPU 编号", required = true)
|
||||
private Integer spuId;
|
||||
@ApiModelProperty(value = "商品名字", required = true)
|
||||
@Schema(title = "商品名字", required = true)
|
||||
private String skuName;
|
||||
@ApiModelProperty(value = "图片名字", required = true)
|
||||
@Schema(title = "图片名字", required = true)
|
||||
private String skuImage;
|
||||
@ApiModelProperty(value = "商品数量", required = true)
|
||||
@Schema(title = "商品数量", required = true)
|
||||
private Integer quantity;
|
||||
@ApiModelProperty(value = "原始单价,单位:分", required = true)
|
||||
@Schema(title = "原始单价,单位:分", required = true)
|
||||
private Integer originPrice;
|
||||
@ApiModelProperty(value = "购买单价,单位:分", required = true)
|
||||
@Schema(title = "购买单价,单位:分", required = true)
|
||||
private Integer buyPrice;
|
||||
@ApiModelProperty(value = "最终价格,单位:分", required = true)
|
||||
@Schema(title = "最终价格,单位:分", required = true)
|
||||
private Integer presentPrice;
|
||||
@ApiModelProperty(value = "购买总金额,单位:分", required = true)
|
||||
@Schema(title = "购买总金额,单位:分", required = true)
|
||||
private Integer buyTotal;
|
||||
@ApiModelProperty(value = "优惠总金额,单位:分", required = true)
|
||||
@Schema(title = "优惠总金额,单位:分", required = true)
|
||||
private Integer discountTotal;
|
||||
@ApiModelProperty(value = "最终总金额,单位:分", required = true)
|
||||
@Schema(title = "最终总金额,单位:分", required = true)
|
||||
private Integer presentTotal;
|
||||
@ApiModelProperty(value = "退款总金额,单位:分", required = true)
|
||||
@Schema(title = "退款总金额,单位:分", required = true)
|
||||
private Integer refundTotal;
|
||||
@ApiModelProperty(value = "物流id")
|
||||
@Schema(title = "物流id")
|
||||
private Integer logisticsId;
|
||||
@ApiModelProperty(value = "售后状态", required = true)
|
||||
@Schema(title = "售后状态", required = true)
|
||||
private Integer afterSaleStatus;
|
||||
@ApiModelProperty(value = "售后订单编号")
|
||||
@Schema(title = "售后订单编号")
|
||||
private Integer afterSaleOrderId;
|
||||
@ApiModelProperty(value = "创建时间", required = true)
|
||||
@Schema(title = "创建时间", required = true)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
|
||||
|
@@ -1,17 +1,16 @@
|
||||
package cn.iocoder.yudao.module.trade.controller.app.order.vo;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@ApiModel("交易订单分页 Request VO")
|
||||
@Schema(title = "交易订单分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class TradeOrderPageReqVO extends PageParam {
|
||||
|
||||
@ApiModelProperty(value = "订单状态", example = "1", notes = "参见 TradeOrderStatusEnum 枚举")
|
||||
@Schema(title = "订单状态", example = "1", description = "参见 TradeOrderStatusEnum 枚举")
|
||||
private Integer orderStatus;
|
||||
|
||||
}
|
||||
|
@@ -1,64 +1,63 @@
|
||||
package cn.iocoder.yudao.module.trade.controller.app.order.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.*;
|
||||
|
||||
@ApiModel("订单交易 Response VO")
|
||||
@Schema(title = "订单交易 Response VO")
|
||||
@Data
|
||||
public class TradeOrderRespVO {
|
||||
|
||||
@ApiModelProperty(value = "订单编号", required = true)
|
||||
@Schema(title = "订单编号", required = true)
|
||||
private Integer id;
|
||||
@ApiModelProperty(value = "用户编号", required = true)
|
||||
@Schema(title = "用户编号", required = true)
|
||||
private Integer userId;
|
||||
@ApiModelProperty(value = "订单单号", required = true)
|
||||
@Schema(title = "订单单号", required = true)
|
||||
private String orderNo;
|
||||
@ApiModelProperty(value = "订单状态", required = true)
|
||||
@Schema(title = "订单状态", required = true)
|
||||
private Integer orderStatus;
|
||||
@ApiModelProperty(value = "备注")
|
||||
@Schema(title = "备注")
|
||||
private String remark;
|
||||
@ApiModelProperty(value = "订单结束时间")
|
||||
@Schema(title = "订单结束时间")
|
||||
private LocalDateTime endTime;
|
||||
@ApiModelProperty(value = "订单金额(总金额),单位:分", required = true)
|
||||
@Schema(title = "订单金额(总金额),单位:分", required = true)
|
||||
private Integer buyPrice;
|
||||
@ApiModelProperty(value = "优惠总金额,单位:分", required = true)
|
||||
@Schema(title = "优惠总金额,单位:分", required = true)
|
||||
private Integer discountPrice;
|
||||
@ApiModelProperty(value = "物流金额,单位:分", required = true)
|
||||
@Schema(title = "物流金额,单位:分", required = true)
|
||||
private Integer logisticsPrice;
|
||||
@ApiModelProperty(value = "最终金额,单位:分", required = true)
|
||||
@Schema(title = "最终金额,单位:分", required = true)
|
||||
private Integer presentPrice;
|
||||
@ApiModelProperty(value = "支付金额,单位:分", required = true)
|
||||
@Schema(title = "支付金额,单位:分", required = true)
|
||||
private Integer payPrice;
|
||||
@ApiModelProperty(value = "退款金额,单位:分", required = true)
|
||||
@Schema(title = "退款金额,单位:分", required = true)
|
||||
private Integer refundPrice;
|
||||
@ApiModelProperty(value = "付款时间")
|
||||
@Schema(title = "付款时间")
|
||||
private LocalDateTime payTime;
|
||||
@ApiModelProperty(value = "支付订单编号")
|
||||
@Schema(title = "支付订单编号")
|
||||
private Integer payTransactionId;
|
||||
@ApiModelProperty(value = "支付渠道")
|
||||
@Schema(title = "支付渠道")
|
||||
private Integer payChannel;
|
||||
@ApiModelProperty(value = "配送类型", required = true)
|
||||
@Schema(title = "配送类型", required = true)
|
||||
private Integer deliveryType;
|
||||
@ApiModelProperty(value = "发货时间")
|
||||
@Schema(title = "发货时间")
|
||||
private LocalDateTime deliveryTime;
|
||||
@ApiModelProperty(value = "收货时间")
|
||||
@Schema(title = "收货时间")
|
||||
private LocalDateTime receiveTime;
|
||||
@ApiModelProperty(value = "收件人名称", required = true)
|
||||
@Schema(title = "收件人名称", required = true)
|
||||
private String receiverName;
|
||||
@ApiModelProperty(value = "手机号", required = true)
|
||||
@Schema(title = "手机号", required = true)
|
||||
private String receiverMobile;
|
||||
@ApiModelProperty(value = "地区编码", required = true)
|
||||
@Schema(title = "地区编码", required = true)
|
||||
private Integer receiverAreaCode;
|
||||
@ApiModelProperty(value = "收件详细地址", required = true)
|
||||
@Schema(title = "收件详细地址", required = true)
|
||||
private String receiverDetailAddress;
|
||||
@ApiModelProperty(value = "售后状态", required = true)
|
||||
@Schema(title = "售后状态", required = true)
|
||||
private Integer afterSaleStatus;
|
||||
@ApiModelProperty(value = "优惠劵编号")
|
||||
@Schema(title = "优惠劵编号")
|
||||
private Integer couponCardId;
|
||||
@ApiModelProperty(value = "创建时间", required = true)
|
||||
@Schema(title = "创建时间", required = true)
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user