From f72dd272a22ffa63bde3f156be2fb43cd6ba2555 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Wed, 2 Oct 2024 15:26:25 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E3=80=91=E5=95=86=E5=9F=8E:=20APP=20=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E7=A7=AF=E5=88=86=E5=95=86=E5=9F=8E=E6=B4=BB=E5=8A=A8=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/app/point/AppPointActivityController.java | 4 ++++ .../app/point/vo/AppPointActivityDetailRespVO.java | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/point/AppPointActivityController.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/point/AppPointActivityController.java index 20cc8b6c3..ed6998340 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/point/AppPointActivityController.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/point/AppPointActivityController.java @@ -74,7 +74,11 @@ public class AppPointActivityController { // 2. 拼接数据 List products = pointActivityService.getPointProductListByActivityIds(Collections.singletonList(id)); AppPointActivityDetailRespVO respVO = BeanUtils.toBean(activity, AppPointActivityDetailRespVO.class); + // 设置 product 信息 respVO.setProducts(BeanUtils.toBean(products, AppPointActivityDetailRespVO.Product.class)); + PointProductDO minProduct = getMinPropertyObj(products, PointProductDO::getPoint); + assert minProduct != null; + respVO.setPoint(minProduct.getPoint()).setPrice(minProduct.getPrice()); return success(respVO); } diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/point/vo/AppPointActivityDetailRespVO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/point/vo/AppPointActivityDetailRespVO.java index 8253e4fe2..9153d68b6 100644 --- a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/point/vo/AppPointActivityDetailRespVO.java +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/controller/app/point/vo/AppPointActivityDetailRespVO.java @@ -30,6 +30,14 @@ public class AppPointActivityDetailRespVO { @Schema(description = "商品信息数组", requiredMode = Schema.RequiredMode.REQUIRED) private List products; + //======================= 显示所需兑换积分最少的 sku 信息 ======================= + + @Schema(description = "兑换积分", requiredMode = Schema.RequiredMode.REQUIRED) + private Integer point; + + @Schema(description = "兑换金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "15860") + private Integer price; + @Schema(description = "商品信息") @Data public static class Product {