From d795dbc7ac4dcb3a74add152f6b2bf33e5100d84 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 18 Jun 2023 20:15:34 +0800 Subject: [PATCH] =?UTF-8?q?mall=20+=20promotion=EF=BC=9A=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E9=99=90=E8=B4=AD=E3=80=81=E5=BA=93=E5=AD=98=E7=9A=84=E8=BF=94?= =?UTF-8?q?=E5=9B=9E=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppCombinationActivityController.java | 11 ++++------- .../AppCombinationActivityDetailRespVO.java | 12 ++++++------ .../seckill/AppSeckillActivityController.java | 18 ++++++++++-------- .../AppSeckillActivityDetailRespVO.java | 17 +++++++++++++---- 4 files changed, 33 insertions(+), 25 deletions(-) diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/combination/AppCombinationActivityController.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/combination/AppCombinationActivityController.java index 54b6d7da7..216ec5285 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/combination/AppCombinationActivityController.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/combination/AppCombinationActivityController.java @@ -94,34 +94,31 @@ public class AppCombinationActivityController { obj.setName("晚九点限时秒杀"); obj.setStatus(1); obj.setStartTime(LocalDateTime.of(2023, 6, 15, 0, 0, 0)); - obj.setEndTime(LocalDateTime.of(2023, 6, 15, 23, 59, 0)); + obj.setEndTime(LocalDateTime.of(2023, 6, 20, 23, 59, 0)); obj.setUserSize(2); obj.setSuccessCount(100); obj.setSpuId(633L); + obj.setSingleLimitCount(2); + obj.setTotalLimitCount(3); + // 创建一个Product对象的列表 List productList = new ArrayList<>(); // 创建三个新的Product对象并设置其属性的值 AppCombinationActivityDetailRespVO.Product product1 = new AppCombinationActivityDetailRespVO.Product(); product1.setSkuId(1L); product1.setCombinationPrice(100); - product1.setQuota(50); - product1.setLimitCount(3); // 将第一个Product对象添加到列表中 productList.add(product1); // 创建第二个Product对象并设置其属性的值 AppCombinationActivityDetailRespVO.Product product2 = new AppCombinationActivityDetailRespVO.Product(); product2.setSkuId(2L); product2.setCombinationPrice(200); - product2.setQuota(100); - product2.setLimitCount(4); // 将第二个Product对象添加到列表中 productList.add(product2); // 创建第三个Product对象并设置其属性的值 AppCombinationActivityDetailRespVO.Product product3 = new AppCombinationActivityDetailRespVO.Product(); product3.setSkuId(3L); product3.setCombinationPrice(300); - product3.setQuota(150); - product3.setLimitCount(5); // 将第三个Product对象添加到列表中 productList.add(product3); // 将Product列表设置为对象的属性值 diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/combination/vo/activity/AppCombinationActivityDetailRespVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/combination/vo/activity/AppCombinationActivityDetailRespVO.java index 79e54d610..2e6d1a40a 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/combination/vo/activity/AppCombinationActivityDetailRespVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/combination/vo/activity/AppCombinationActivityDetailRespVO.java @@ -34,6 +34,12 @@ public class AppCombinationActivityDetailRespVO { @Schema(description = "商品 SPU 编号", required = true, example = "2048") private Long spuId; + @Schema(description = "总共限购数量", example = "10") + private Integer totalLimitCount; + + @Schema(description = "单次限购数量", example = "5") + private Integer singleLimitCount; + @Schema(description = "商品信息数组", required = true) private List products; @@ -47,12 +53,6 @@ public class AppCombinationActivityDetailRespVO { @Schema(description = "拼团金额,单位:分", required = true, example = "100") private Integer combinationPrice; - @Schema(description = "拼团限量库存", required = true, example = "50") - private Integer quota; - - @Schema(description = "每人限购数量", required = true, example = "10") - private Integer limitCount; - } } 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 29d4cfa56..e23cb2a04 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 @@ -90,33 +90,35 @@ public class AppSeckillActivityController { obj.setId(id); obj.setName("晚九点限时秒杀"); obj.setStatus(1); - obj.setStartTime(LocalDateTime.of(2023, 6, 11, 0, 0, 0)); - obj.setEndTime(LocalDateTime.of(2023, 6, 11, 23, 59, 0)); + obj.setStartTime(LocalDateTime.of(2023, 6, 16, 0, 0, 0)); + obj.setEndTime(LocalDateTime.of(2023, 6, 20, 23, 59, 0)); obj.setSpuId(633L); + obj.setSingleLimitCount(2); + obj.setTotalLimitCount(3); + obj.setStock(100); + obj.setTotalStock(200); + // 创建一个Product对象的列表 List productList = new ArrayList<>(); // 创建三个新的Product对象并设置其属性的值 AppSeckillActivityDetailRespVO.Product product1 = new AppSeckillActivityDetailRespVO.Product(); product1.setSkuId(1L); product1.setSeckillPrice(100); - product1.setQuota(50); - product1.setLimitCount(3); + product1.setStock(50); // 将第一个Product对象添加到列表中 productList.add(product1); // 创建第二个Product对象并设置其属性的值 AppSeckillActivityDetailRespVO.Product product2 = new AppSeckillActivityDetailRespVO.Product(); product2.setSkuId(2L); product2.setSeckillPrice(200); - product2.setQuota(100); - product2.setLimitCount(4); + product2.setStock(100); // 将第二个Product对象添加到列表中 productList.add(product2); // 创建第三个Product对象并设置其属性的值 AppSeckillActivityDetailRespVO.Product product3 = new AppSeckillActivityDetailRespVO.Product(); product3.setSkuId(3L); product3.setSeckillPrice(300); - product3.setQuota(150); - product3.setLimitCount(5); + product3.setStock(150); // 将第三个Product对象添加到列表中 productList.add(product3); // 将Product列表设置为对象的属性值 diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/seckill/vo/activity/AppSeckillActivityDetailRespVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/seckill/vo/activity/AppSeckillActivityDetailRespVO.java index 2eec526ff..3622bc923 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/seckill/vo/activity/AppSeckillActivityDetailRespVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/seckill/vo/activity/AppSeckillActivityDetailRespVO.java @@ -30,6 +30,18 @@ public class AppSeckillActivityDetailRespVO { @Schema(description = "商品 SPU 编号", required = true, example = "2048") private Long spuId; + @Schema(description = "总共限购数量", example = "10") + private Integer totalLimitCount; + + @Schema(description = "单次限购数量", example = "5") + private Integer singleLimitCount; + + @Schema(description = "秒杀库存(剩余)", required = true, example = "50") + private Integer stock; + + @Schema(description = "秒杀库存(总计)", required = true, example = "100") + private Integer totalStock; + @Schema(description = "商品信息数组", required = true) private List products; @@ -44,10 +56,7 @@ public class AppSeckillActivityDetailRespVO { private Integer seckillPrice; @Schema(description = "秒杀限量库存", required = true, example = "50") - private Integer quota; - - @Schema(description = "每人限购数量", required = true, example = "10") - private Integer limitCount; + private Integer stock; }