mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-22 15:21:53 +08:00
【功能完善】商城: APP 完善积分商城活动接口返回
This commit is contained in:
parent
14d239f2de
commit
f72dd272a2
@ -74,7 +74,11 @@ public class AppPointActivityController {
|
|||||||
// 2. 拼接数据
|
// 2. 拼接数据
|
||||||
List<PointProductDO> products = pointActivityService.getPointProductListByActivityIds(Collections.singletonList(id));
|
List<PointProductDO> products = pointActivityService.getPointProductListByActivityIds(Collections.singletonList(id));
|
||||||
AppPointActivityDetailRespVO respVO = BeanUtils.toBean(activity, AppPointActivityDetailRespVO.class);
|
AppPointActivityDetailRespVO respVO = BeanUtils.toBean(activity, AppPointActivityDetailRespVO.class);
|
||||||
|
// 设置 product 信息
|
||||||
respVO.setProducts(BeanUtils.toBean(products, AppPointActivityDetailRespVO.Product.class));
|
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);
|
return success(respVO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,6 +30,14 @@ public class AppPointActivityDetailRespVO {
|
|||||||
@Schema(description = "商品信息数组", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(description = "商品信息数组", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
private List<Product> products;
|
private List<Product> products;
|
||||||
|
|
||||||
|
//======================= 显示所需兑换积分最少的 sku 信息 =======================
|
||||||
|
|
||||||
|
@Schema(description = "兑换积分", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
|
private Integer point;
|
||||||
|
|
||||||
|
@Schema(description = "兑换金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "15860")
|
||||||
|
private Integer price;
|
||||||
|
|
||||||
@Schema(description = "商品信息")
|
@Schema(description = "商品信息")
|
||||||
@Data
|
@Data
|
||||||
public static class Product {
|
public static class Product {
|
||||||
|
Loading…
Reference in New Issue
Block a user