Merge remote-tracking branch 'yudao/feature/mall_product' into feature/mall_product

This commit is contained in:
puhui999 2023-06-19 08:33:48 +08:00
commit 49d726019a
14 changed files with 84 additions and 37 deletions

View File

@ -8,7 +8,7 @@ import lombok.ToString;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
@Schema(description = "用户APP - 商品评价分页 Request VO") @Schema(description = "用户 App - 商品评价分页 Request VO")
@Data @Data
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true) @ToString(callSuper = true)

View File

@ -8,7 +8,7 @@ import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size; import javax.validation.constraints.Size;
import java.util.List; import java.util.List;
@Schema(description = "用户APP - 商品评价创建 Request VO") @Schema(description = "用户 App - 商品评价创建 Request VO")
@Data @Data
@ToString(callSuper = true) @ToString(callSuper = true)
public class AppProductCommentCreateReqVO { public class AppProductCommentCreateReqVO {

View File

@ -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; 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 * @author HUIHUI
*/ */
@Schema(description = "用户APP - 商品评价详情 Response VO") @Schema(description = "用户 App - 商品评价详情 Response VO")
@Data @Data
@ToString(callSuper = true) @ToString(callSuper = true)
public class AppProductCommentRespVO { public class AppProductCommentRespVO {

View File

@ -4,7 +4,7 @@ import cn.iocoder.yudao.framework.common.pojo.PageParam;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
@Schema(description = "用户APP - 商品收藏分页查询 Request VO") @Schema(description = "用户 App - 商品收藏分页查询 Request VO")
@Data @Data
public class AppFavoritePageReqVO extends PageParam { public class AppFavoritePageReqVO extends PageParam {
} }

View File

@ -4,7 +4,7 @@ import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED; import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;
@Schema(description = "用户APP - 商品收藏 Response VO") @Schema(description = "用户 App - 商品收藏 Response VO")
@Data @Data
public class AppFavoriteRespVO { public class AppFavoriteRespVO {

View File

@ -94,34 +94,31 @@ public class AppCombinationActivityController {
obj.setName("晚九点限时秒杀"); obj.setName("晚九点限时秒杀");
obj.setStatus(1); obj.setStatus(1);
obj.setStartTime(LocalDateTime.of(2023, 6, 15, 0, 0, 0)); 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.setUserSize(2);
obj.setSuccessCount(100); obj.setSuccessCount(100);
obj.setSpuId(633L); obj.setSpuId(633L);
obj.setSingleLimitCount(2);
obj.setTotalLimitCount(3);
// 创建一个Product对象的列表 // 创建一个Product对象的列表
List<AppCombinationActivityDetailRespVO.Product> productList = new ArrayList<>(); List<AppCombinationActivityDetailRespVO.Product> productList = new ArrayList<>();
// 创建三个新的Product对象并设置其属性的值 // 创建三个新的Product对象并设置其属性的值
AppCombinationActivityDetailRespVO.Product product1 = new AppCombinationActivityDetailRespVO.Product(); AppCombinationActivityDetailRespVO.Product product1 = new AppCombinationActivityDetailRespVO.Product();
product1.setSkuId(1L); product1.setSkuId(1L);
product1.setCombinationPrice(100); product1.setCombinationPrice(100);
product1.setQuota(50);
product1.setLimitCount(3);
// 将第一个Product对象添加到列表中 // 将第一个Product对象添加到列表中
productList.add(product1); productList.add(product1);
// 创建第二个Product对象并设置其属性的值 // 创建第二个Product对象并设置其属性的值
AppCombinationActivityDetailRespVO.Product product2 = new AppCombinationActivityDetailRespVO.Product(); AppCombinationActivityDetailRespVO.Product product2 = new AppCombinationActivityDetailRespVO.Product();
product2.setSkuId(2L); product2.setSkuId(2L);
product2.setCombinationPrice(200); product2.setCombinationPrice(200);
product2.setQuota(100);
product2.setLimitCount(4);
// 将第二个Product对象添加到列表中 // 将第二个Product对象添加到列表中
productList.add(product2); productList.add(product2);
// 创建第三个Product对象并设置其属性的值 // 创建第三个Product对象并设置其属性的值
AppCombinationActivityDetailRespVO.Product product3 = new AppCombinationActivityDetailRespVO.Product(); AppCombinationActivityDetailRespVO.Product product3 = new AppCombinationActivityDetailRespVO.Product();
product3.setSkuId(3L); product3.setSkuId(3L);
product3.setCombinationPrice(300); product3.setCombinationPrice(300);
product3.setQuota(150);
product3.setLimitCount(5);
// 将第三个Product对象添加到列表中 // 将第三个Product对象添加到列表中
productList.add(product3); productList.add(product3);
// 将Product列表设置为对象的属性值 // 将Product列表设置为对象的属性值

View File

@ -34,6 +34,12 @@ public class AppCombinationActivityDetailRespVO {
@Schema(description = "商品 SPU 编号", required = true, example = "2048") @Schema(description = "商品 SPU 编号", required = true, example = "2048")
private Long spuId; private Long spuId;
@Schema(description = "总共限购数量", example = "10")
private Integer totalLimitCount;
@Schema(description = "单次限购数量", example = "5")
private Integer singleLimitCount;
@Schema(description = "商品信息数组", required = true) @Schema(description = "商品信息数组", required = true)
private List<Product> products; private List<Product> products;
@ -47,12 +53,6 @@ public class AppCombinationActivityDetailRespVO {
@Schema(description = "拼团金额,单位:分", required = true, example = "100") @Schema(description = "拼团金额,单位:分", required = true, example = "100")
private Integer combinationPrice; private Integer combinationPrice;
@Schema(description = "拼团限量库存", required = true, example = "50")
private Integer quota;
@Schema(description = "每人限购数量", required = true, example = "10")
private Integer limitCount;
} }
} }

View File

@ -4,6 +4,7 @@ import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageResult; 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.AppSeckillActivityDetailRespVO;
import cn.iocoder.yudao.module.promotion.controller.app.seckill.vo.activity.AppSeckillActivityNowRespVO; 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.activity.AppSeckillActivityRespVO;
import cn.iocoder.yudao.module.promotion.controller.app.seckill.vo.config.AppSeckillConfigRespVO; import cn.iocoder.yudao.module.promotion.controller.app.seckill.vo.config.AppSeckillConfigRespVO;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
@ -58,7 +59,7 @@ public class AppSeckillActivityController {
@GetMapping("/page") @GetMapping("/page")
@Operation(summary = "获得秒杀活动分页") @Operation(summary = "获得秒杀活动分页")
// TODO @芋艿分页参数 // TODO @芋艿分页参数
public CommonResult<PageResult<AppSeckillActivityRespVO>> getSeckillActivityPage() { public CommonResult<PageResult<AppSeckillActivityRespVO>> getSeckillActivityPage(AppSeckillActivityPageReqVO pageReqVO) {
List<AppSeckillActivityRespVO> activityList = new ArrayList<>(); List<AppSeckillActivityRespVO> activityList = new ArrayList<>();
AppSeckillActivityRespVO activity1 = new AppSeckillActivityRespVO(); AppSeckillActivityRespVO activity1 = new AppSeckillActivityRespVO();
activity1.setId(1L); activity1.setId(1L);
@ -67,6 +68,9 @@ public class AppSeckillActivityController {
activity1.setPicUrl("https://demo26.crmeb.net/uploads/attach/2021/11/15/a79f5d2ea6bf0c3c11b2127332dfe2df.jpg"); activity1.setPicUrl("https://demo26.crmeb.net/uploads/attach/2021/11/15/a79f5d2ea6bf0c3c11b2127332dfe2df.jpg");
activity1.setMarketPrice(50); activity1.setMarketPrice(50);
activity1.setSeckillPrice(100); activity1.setSeckillPrice(100);
activity1.setUnitName("");
activity1.setStock(1);
activity1.setTotalStock(2);
activityList.add(activity1); activityList.add(activity1);
AppSeckillActivityRespVO activity2 = new AppSeckillActivityRespVO(); AppSeckillActivityRespVO activity2 = new AppSeckillActivityRespVO();
@ -76,6 +80,9 @@ public class AppSeckillActivityController {
activity2.setPicUrl("https://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTKXMYJOomfp7cebz3cIeb8sHk3GGSIJtWEgREe3j7J1WoAbTvIOicpcNdFkWAziatBSMod8b5RyS4CQ/132"); activity2.setPicUrl("https://thirdwx.qlogo.cn/mmopen/vi_32/Q0j4TwGTfTKXMYJOomfp7cebz3cIeb8sHk3GGSIJtWEgREe3j7J1WoAbTvIOicpcNdFkWAziatBSMod8b5RyS4CQ/132");
activity2.setMarketPrice(100); activity2.setMarketPrice(100);
activity2.setSeckillPrice(200); activity2.setSeckillPrice(200);
activity2.setUnitName("");
activity2.setStock(2);
activity2.setTotalStock(3);
activityList.add(activity2); activityList.add(activity2);
return success(new PageResult<>(activityList, 100L)); return success(new PageResult<>(activityList, 100L));
} }
@ -90,33 +97,35 @@ public class AppSeckillActivityController {
obj.setId(id); obj.setId(id);
obj.setName("晚九点限时秒杀"); obj.setName("晚九点限时秒杀");
obj.setStatus(1); obj.setStatus(1);
obj.setStartTime(LocalDateTime.of(2023, 6, 11, 0, 0, 0)); obj.setStartTime(LocalDateTime.of(2023, 6, 16, 0, 0, 0));
obj.setEndTime(LocalDateTime.of(2023, 6, 11, 23, 59, 0)); obj.setEndTime(LocalDateTime.of(2023, 6, 20, 23, 59, 0));
obj.setSpuId(633L); obj.setSpuId(633L);
obj.setSingleLimitCount(2);
obj.setTotalLimitCount(3);
obj.setStock(100);
obj.setTotalStock(200);
// 创建一个Product对象的列表 // 创建一个Product对象的列表
List<AppSeckillActivityDetailRespVO.Product> productList = new ArrayList<>(); List<AppSeckillActivityDetailRespVO.Product> productList = new ArrayList<>();
// 创建三个新的Product对象并设置其属性的值 // 创建三个新的Product对象并设置其属性的值
AppSeckillActivityDetailRespVO.Product product1 = new AppSeckillActivityDetailRespVO.Product(); AppSeckillActivityDetailRespVO.Product product1 = new AppSeckillActivityDetailRespVO.Product();
product1.setSkuId(1L); product1.setSkuId(1L);
product1.setSeckillPrice(100); product1.setSeckillPrice(100);
product1.setQuota(50); product1.setStock(50);
product1.setLimitCount(3);
// 将第一个Product对象添加到列表中 // 将第一个Product对象添加到列表中
productList.add(product1); productList.add(product1);
// 创建第二个Product对象并设置其属性的值 // 创建第二个Product对象并设置其属性的值
AppSeckillActivityDetailRespVO.Product product2 = new AppSeckillActivityDetailRespVO.Product(); AppSeckillActivityDetailRespVO.Product product2 = new AppSeckillActivityDetailRespVO.Product();
product2.setSkuId(2L); product2.setSkuId(2L);
product2.setSeckillPrice(200); product2.setSeckillPrice(200);
product2.setQuota(100); product2.setStock(100);
product2.setLimitCount(4);
// 将第二个Product对象添加到列表中 // 将第二个Product对象添加到列表中
productList.add(product2); productList.add(product2);
// 创建第三个Product对象并设置其属性的值 // 创建第三个Product对象并设置其属性的值
AppSeckillActivityDetailRespVO.Product product3 = new AppSeckillActivityDetailRespVO.Product(); AppSeckillActivityDetailRespVO.Product product3 = new AppSeckillActivityDetailRespVO.Product();
product3.setSkuId(3L); product3.setSkuId(3L);
product3.setSeckillPrice(300); product3.setSeckillPrice(300);
product3.setQuota(150); product3.setStock(150);
product3.setLimitCount(5);
// 将第三个Product对象添加到列表中 // 将第三个Product对象添加到列表中
productList.add(product3); productList.add(product3);
// 将Product列表设置为对象的属性值 // 将Product列表设置为对象的属性值

View File

@ -22,11 +22,14 @@ public class AppSeckillConfigController {
@GetMapping("/list") @GetMapping("/list")
@Operation(summary = "获得秒杀时间段列表") @Operation(summary = "获得秒杀时间段列表")
public CommonResult<List<AppSeckillConfigRespVO>> getConfigList() { public CommonResult<List<AppSeckillConfigRespVO>> getSeckillConfigList() {
return success(Arrays.asList( 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("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")
)); ));
} }

View File

@ -30,6 +30,18 @@ public class AppSeckillActivityDetailRespVO {
@Schema(description = "商品 SPU 编号", required = true, example = "2048") @Schema(description = "商品 SPU 编号", required = true, example = "2048")
private Long spuId; 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) @Schema(description = "商品信息数组", required = true)
private List<Product> products; private List<Product> products;
@ -44,10 +56,7 @@ public class AppSeckillActivityDetailRespVO {
private Integer seckillPrice; private Integer seckillPrice;
@Schema(description = "秒杀限量库存", required = true, example = "50") @Schema(description = "秒杀限量库存", required = true, example = "50")
private Integer quota; private Integer stock;
@Schema(description = "每人限购数量", required = true, example = "10")
private Integer limitCount;
} }

View File

@ -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;
}

View File

@ -18,10 +18,16 @@ public class AppSeckillActivityRespVO {
@Schema(description = "商品图片", required = true, example = "4096") // SPU picUrl 读取 @Schema(description = "商品图片", required = true, example = "4096") // SPU picUrl 读取
private String picUrl; private String picUrl;
@Schema(description = "单位名", requiredMode = Schema.RequiredMode.REQUIRED, example = "")
private String unitName;
@Schema(description = "商品市场价,单位:分", required = true, example = "50") // SPU marketPrice 读取 @Schema(description = "商品市场价,单位:分", required = true, example = "50") // SPU marketPrice 读取
private Integer 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") // 从秒杀商品里取最低价 @Schema(description = "秒杀金额,单位:分", required = true, example = "100") // 从秒杀商品里取最低价
private Integer seckillPrice; private Integer seckillPrice;

View File

@ -3,6 +3,8 @@ package cn.iocoder.yudao.module.promotion.controller.app.seckill.vo.config;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import java.util.List;
@Schema(description = "用户 App - 秒杀时间段 Response VO") @Schema(description = "用户 App - 秒杀时间段 Response VO")
@Data @Data
public class AppSeckillConfigRespVO { public class AppSeckillConfigRespVO {
@ -15,4 +17,7 @@ public class AppSeckillConfigRespVO {
@Schema(description = "结束时间点", required = true, example = "09:59") @Schema(description = "结束时间点", required = true, example = "09:59")
private String endTime; private String endTime;
@Schema(description = "轮播图", required = true)
private List<String> sliderPicUrls;
} }

View File

@ -7,7 +7,7 @@ import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size; import javax.validation.constraints.Size;
import java.util.List; import java.util.List;
@Schema(description = "用户APP - 商品评价创建 Request VO") @Schema(description = "用户 App - 商品评价创建 Request VO")
@Data @Data
public class AppTradeOrderItemCommentCreateReqVO { public class AppTradeOrderItemCommentCreateReqVO {