提交 af1e8a65 authored 作者: Whispa's avatar Whispa

commit

上级 2795178a
...@@ -210,13 +210,13 @@ public class TbCfOrder { ...@@ -210,13 +210,13 @@ public class TbCfOrder {
List<TemplateVo> templateList = new ArrayList<>(); List<TemplateVo> templateList = new ArrayList<>();
itemOrderList.forEach(item -> { itemOrderList.forEach(item -> {
BigDecimal priceTotal = item.getItemPriceTotal(); BigDecimal itemPrice = item.getItemPriceTotal();
TbCfExpressTemplate template = item.getTemplate(); TbCfExpressTemplate template = item.getTemplate();
itemsPrice = itemsPrice.add(priceTotal); itemsPrice = itemsPrice.add(itemPrice);
tax = tax.add(calculateDutyFee(itemsPrice, template)); tax = tax.add(calculateDutyFee(itemPrice, template));
fee = fee.add(calculateHandlingFee(itemsPrice, template)); fee = fee.add(calculateHandlingFee(itemPrice, template));
if (template != null) if (template != null)
templateList.add(new TemplateVo(template, template.getTemplateId(), item.getItemNum(), itemsPrice)); templateList.add(new TemplateVo(template, template.getTemplateId(), item.getItemNum(), itemPrice));
}); });
Map<String, List<TemplateVo>> map = templateList.stream().collect(Collectors.groupingBy(TemplateVo::getTemplateId)); Map<String, List<TemplateVo>> map = templateList.stream().collect(Collectors.groupingBy(TemplateVo::getTemplateId));
//按模板分组计算商品价格 //按模板分组计算商品价格
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论