Commit f72dd272a22ffa63bde3f156be2fb43cd6ba2555
1 parent
14d239f2
【功能完善】商城: APP 完善积分商城活动接口返回
Showing
2 changed files
with
12 additions
and
0 deletions
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 { |
| 74 | 74 | // 2. 拼接数据 |
| 75 | 75 | List<PointProductDO> products = pointActivityService.getPointProductListByActivityIds(Collections.singletonList(id)); |
| 76 | 76 | AppPointActivityDetailRespVO respVO = BeanUtils.toBean(activity, AppPointActivityDetailRespVO.class); |
| 77 | + // 设置 product 信息 | |
| 77 | 78 | respVO.setProducts(BeanUtils.toBean(products, AppPointActivityDetailRespVO.Product.class)); |
| 79 | + PointProductDO minProduct = getMinPropertyObj(products, PointProductDO::getPoint); | |
| 80 | + assert minProduct != null; | |
| 81 | + respVO.setPoint(minProduct.getPoint()).setPrice(minProduct.getPrice()); | |
| 78 | 82 | return success(respVO); |
| 79 | 83 | } |
| 80 | 84 | ... | ... |
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 { |
| 30 | 30 | @Schema(description = "商品信息数组", requiredMode = Schema.RequiredMode.REQUIRED) |
| 31 | 31 | private List<Product> products; |
| 32 | 32 | |
| 33 | + //======================= 显示所需兑换积分最少的 sku 信息 ======================= | |
| 34 | + | |
| 35 | + @Schema(description = "兑换积分", requiredMode = Schema.RequiredMode.REQUIRED) | |
| 36 | + private Integer point; | |
| 37 | + | |
| 38 | + @Schema(description = "兑换金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "15860") | |
| 39 | + private Integer price; | |
| 40 | + | |
| 33 | 41 | @Schema(description = "商品信息") |
| 34 | 42 | @Data |
| 35 | 43 | public static class Product { | ... | ... |