From fc570b6062026e8cdb3a1e9feeea98c4e62a8643 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 18 Jun 2023 21:23:50 +0800 Subject: [PATCH] =?UTF-8?q?mall=20+=20promotion=EF=BC=9A=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E7=A7=92=E6=9D=80=E6=B4=BB=E5=8A=A8=E7=9A=84=20mock=20?= =?UTF-8?q?=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/comment/vo/AppCommentPageReqVO.java | 2 +- .../vo/AppProductCommentCreateReqVO.java | 2 +- .../comment/vo/AppProductCommentRespVO.java | 4 ++-- .../app/favorite/vo/AppFavoritePageReqVO.java | 2 +- .../app/favorite/vo/AppFavoriteRespVO.java | 2 +- .../seckill/AppSeckillActivityController.java | 9 ++++++++- .../seckill/AppSeckillConfigController.java | 9 ++++++--- .../activity/AppSeckillActivityPageReqVO.java | 18 ++++++++++++++++++ .../vo/activity/AppSeckillActivityRespVO.java | 8 +++++++- .../vo/config/AppSeckillConfigRespVO.java | 5 +++++ .../AppTradeOrderItemCommentCreateReqVO.java | 2 +- 11 files changed, 51 insertions(+), 12 deletions(-) create mode 100644 yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/seckill/vo/activity/AppSeckillActivityPageReqVO.java diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/comment/vo/AppCommentPageReqVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/comment/vo/AppCommentPageReqVO.java index a6d0827e0..a81dcc3eb 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/comment/vo/AppCommentPageReqVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/comment/vo/AppCommentPageReqVO.java @@ -8,7 +8,7 @@ import lombok.ToString; import javax.validation.constraints.NotNull; -@Schema(description = "用户APP - 商品评价分页 Request VO") +@Schema(description = "用户 App - 商品评价分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/comment/vo/AppProductCommentCreateReqVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/comment/vo/AppProductCommentCreateReqVO.java index 272fe64e9..d17915d9d 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/comment/vo/AppProductCommentCreateReqVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/comment/vo/AppProductCommentCreateReqVO.java @@ -8,7 +8,7 @@ import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; import java.util.List; -@Schema(description = "用户APP - 商品评价创建 Request VO") +@Schema(description = "用户 App - 商品评价创建 Request VO") @Data @ToString(callSuper = true) public class AppProductCommentCreateReqVO { diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/comment/vo/AppProductCommentRespVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/comment/vo/AppProductCommentRespVO.java index 5aa5c8530..236fd177c 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/comment/vo/AppProductCommentRespVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/comment/vo/AppProductCommentRespVO.java @@ -14,11 +14,11 @@ import java.util.List; import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; /** - * 用户APP - 商品评价详情 Response VO + * 用户 App - 商品评价详情 Response VO * * @author HUIHUI */ -@Schema(description = "用户APP - 商品评价详情 Response VO") +@Schema(description = "用户 App - 商品评价详情 Response VO") @Data @ToString(callSuper = true) public class AppProductCommentRespVO { diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/favorite/vo/AppFavoritePageReqVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/favorite/vo/AppFavoritePageReqVO.java index cdf8257c3..2aacc3e54 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/favorite/vo/AppFavoritePageReqVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/favorite/vo/AppFavoritePageReqVO.java @@ -4,7 +4,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageParam; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; -@Schema(description = "用户APP - 商品收藏分页查询 Request VO") +@Schema(description = "用户 App - 商品收藏分页查询 Request VO") @Data public class AppFavoritePageReqVO extends PageParam { } diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/favorite/vo/AppFavoriteRespVO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/favorite/vo/AppFavoriteRespVO.java index 399e1fb0a..db2ea90a4 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/favorite/vo/AppFavoriteRespVO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/favorite/vo/AppFavoriteRespVO.java @@ -4,7 +4,7 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED; -@Schema(description = "用户APP - 商品收藏 Response VO") +@Schema(description = "用户 App - 商品收藏 Response VO") @Data public class AppFavoriteRespVO { diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/seckill/AppSeckillActivityController.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/seckill/AppSeckillActivityController.java index e23cb2a04..7c4fd9ee2 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/seckill/AppSeckillActivityController.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/seckill/AppSeckillActivityController.java @@ -4,6 +4,7 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult; import cn.iocoder.yudao.framework.common.pojo.PageResult; import cn.iocoder.yudao.module.promotion.controller.app.seckill.vo.activity.AppSeckillActivityDetailRespVO; import cn.iocoder.yudao.module.promotion.controller.app.seckill.vo.activity.AppSeckillActivityNowRespVO; +import cn.iocoder.yudao.module.promotion.controller.app.seckill.vo.activity.AppSeckillActivityPageReqVO; import cn.iocoder.yudao.module.promotion.controller.app.seckill.vo.activity.AppSeckillActivityRespVO; import cn.iocoder.yudao.module.promotion.controller.app.seckill.vo.config.AppSeckillConfigRespVO; import io.swagger.v3.oas.annotations.Operation; @@ -58,7 +59,7 @@ public class AppSeckillActivityController { @GetMapping("/page") @Operation(summary = "获得秒杀活动分页") // TODO @芋艿:分页参数 - public CommonResult> getSeckillActivityPage() { + public CommonResult> getSeckillActivityPage(AppSeckillActivityPageReqVO pageReqVO) { List activityList = new ArrayList<>(); AppSeckillActivityRespVO activity1 = new AppSeckillActivityRespVO(); activity1.setId(1L); @@ -67,6 +68,9 @@ public class AppSeckillActivityController { activity1.setPicUrl("https://demo26.crmeb.net/uploads/attach/2021/11/15/a79f5d2ea6bf0c3c11b2127332dfe2df.jpg"); activity1.setMarketPrice(50); activity1.setSeckillPrice(100); + activity1.setUnitName("个"); + activity1.setStock(1); + activity1.setTotalStock(2); activityList.add(activity1); AppSeckillActivityRespVO activity2 = new AppSeckillActivityRespVO(); @@ -76,6 +80,9 @@ public class AppSeckillActivityController { activity2.setPicUrl("https://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTKXMYJOomfp7cebz3cIeb8sHk3GGSIJtWEgREe3j7J1WoAbTvIOicpcNdFkWAziatBSMod8b5RyS4CQ/132"); activity2.setMarketPrice(100); activity2.setSeckillPrice(200); + activity2.setUnitName("套"); + activity2.setStock(2); + activity2.setTotalStock(3); activityList.add(activity2); return success(new PageResult<>(activityList, 100L)); } diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/seckill/AppSeckillConfigController.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/seckill/AppSeckillConfigController.java index a085fb767..23a5aa4bc 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/seckill/AppSeckillConfigController.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/seckill/AppSeckillConfigController.java @@ -22,11 +22,14 @@ public class AppSeckillConfigController { @GetMapping("/list") @Operation(summary = "获得秒杀时间段列表") - public CommonResult> getConfigList() { + public CommonResult> getSeckillConfigList() { return success(Arrays.asList( - new AppSeckillConfigRespVO().setId(1L).setStartTime("00:00").setEndTime("09:59"), + new AppSeckillConfigRespVO().setId(1L).setStartTime("00:00").setEndTime("09:59") + .setSliderPicUrls(Arrays.asList("https://demo26.crmeb.net/uploads/attach/2021/11/15/a79f5d2ea6bf0c3c11b2127332dfe2df.jpg", + "https://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTKXMYJOomfp7cebz3cIeb8sHk3GGSIJtWEgREe3j7J1WoAbTvIOicpcNdFkWAziatBSMod8b5RyS4CQ/132")), new AppSeckillConfigRespVO().setId(2L).setStartTime("10:00").setEndTime("12:59"), - new AppSeckillConfigRespVO().setId(2L).setStartTime("13:00").setEndTime("23:59") + new AppSeckillConfigRespVO().setId(2L).setStartTime("13:00").setEndTime("22:59"), + new AppSeckillConfigRespVO().setId(2L).setStartTime("23:00").setEndTime("23:59") )); } diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/seckill/vo/activity/AppSeckillActivityPageReqVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/seckill/vo/activity/AppSeckillActivityPageReqVO.java new file mode 100644 index 000000000..158f11fd3 --- /dev/null +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/seckill/vo/activity/AppSeckillActivityPageReqVO.java @@ -0,0 +1,18 @@ +package cn.iocoder.yudao.module.promotion.controller.app.seckill.vo.activity; + +import cn.iocoder.yudao.framework.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +@Schema(description = "用户 App - 商品评价分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class AppSeckillActivityPageReqVO extends PageParam { + + @Schema(description = "秒杀配置编号", example = "1024") + private Long configId; + +} diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/seckill/vo/activity/AppSeckillActivityRespVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/seckill/vo/activity/AppSeckillActivityRespVO.java index 20cee9b65..92ec5ef17 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/seckill/vo/activity/AppSeckillActivityRespVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/seckill/vo/activity/AppSeckillActivityRespVO.java @@ -18,10 +18,16 @@ public class AppSeckillActivityRespVO { @Schema(description = "商品图片", required = true, example = "4096") // 从 SPU 的 picUrl 读取 private String picUrl; - + @Schema(description = "单位名", requiredMode = Schema.RequiredMode.REQUIRED, example = "个") + private String unitName; @Schema(description = "商品市场价,单位:分", required = true, example = "50") // 从 SPU 的 marketPrice 读取 private Integer marketPrice; + @Schema(description = "秒杀库存(剩余)", required = true, example = "100") + private Integer stock; + @Schema(description = "秒杀库存(总共)", required = true, example = "200") + private Integer totalStock; + @Schema(description = "秒杀金额,单位:分", required = true, example = "100") // 从秒杀商品里取最低价 private Integer seckillPrice; diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/seckill/vo/config/AppSeckillConfigRespVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/seckill/vo/config/AppSeckillConfigRespVO.java index e0b6a0c72..b6eb4045e 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/seckill/vo/config/AppSeckillConfigRespVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/seckill/vo/config/AppSeckillConfigRespVO.java @@ -3,6 +3,8 @@ package cn.iocoder.yudao.module.promotion.controller.app.seckill.vo.config; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; +import java.util.List; + @Schema(description = "用户 App - 秒杀时间段 Response VO") @Data public class AppSeckillConfigRespVO { @@ -15,4 +17,7 @@ public class AppSeckillConfigRespVO { @Schema(description = "结束时间点", required = true, example = "09:59") private String endTime; + @Schema(description = "轮播图", required = true) + private List sliderPicUrls; + } diff --git a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/vo/item/AppTradeOrderItemCommentCreateReqVO.java b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/vo/item/AppTradeOrderItemCommentCreateReqVO.java index 85910e6ef..f75d343f8 100644 --- a/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/vo/item/AppTradeOrderItemCommentCreateReqVO.java +++ b/yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/order/vo/item/AppTradeOrderItemCommentCreateReqVO.java @@ -7,7 +7,7 @@ import javax.validation.constraints.NotNull; import javax.validation.constraints.Size; import java.util.List; -@Schema(description = "用户APP - 商品评价创建 Request VO") +@Schema(description = "用户 App - 商品评价创建 Request VO") @Data public class AppTradeOrderItemCommentCreateReqVO {