前端:订单确认页,接入优惠劵列表(不包括计算)

后端:增加优惠劵的计算逻辑
This commit is contained in:
YunaiV
2019-04-19 22:51:19 +08:00
parent ea4593adbc
commit cb07eb3f71
12 changed files with 339 additions and 33 deletions

View File

@@ -18,6 +18,17 @@ public class CalcOrderPriceBO {
* 商品分组数组
*/
private List<ItemGroup> itemGroups;
/**
* 优惠劵编号
*/
private Integer couponCardId;
/**
* 优惠劵减少的金额
*
* 1. 若未使用优惠劵,返回 null
* 2. 该金额,已经分摊到每个 Item 的 discountTotal ,需要注意。
*/
private Integer couponCardDiscountTotal;
/**
* 邮费信息
*

View File

@@ -3,6 +3,7 @@ package cn.iocoder.mall.order.api.dto;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotNull;
import java.util.List;
/**
@@ -12,9 +13,13 @@ import java.util.List;
@Accessors(chain = true)
public class CalcOrderPriceDTO {
@NotNull(message = "用户编号不能为空")
private Integer userId;
/**
* 商品数组
* 优惠劵编号
*/
private Integer couponCardId;
@NotNull(message = "商品数组不能为空")
private List<Item> items;
@Data