|
@@ -276,12 +276,12 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
}
|
|
}
|
|
|
BigDecimal goods_discount_plus_pay = BigDecimal.ZERO;
|
|
BigDecimal goods_discount_plus_pay = BigDecimal.ZERO;
|
|
|
List<Long> dsSkuIds = new ArrayList<>();
|
|
List<Long> dsSkuIds = new ArrayList<>();
|
|
|
- ds_relations.forEach(re -> {
|
|
|
|
|
- goods_discount_plus_pay.add(re.getDisPrice());
|
|
|
|
|
|
|
+ for (GoodsDiscountPlusPurchaseRelation re : ds_relations) {
|
|
|
|
|
+ goods_discount_plus_pay = goods_discount_plus_pay.add(re.getDisPrice());
|
|
|
dsSkuIds.add(re.getDisSid());
|
|
dsSkuIds.add(re.getDisSid());
|
|
|
- });
|
|
|
|
|
|
|
+ }
|
|
|
BigDecimal pay_money = sku.getPrice().add(goods_discount_plus_pay);
|
|
BigDecimal pay_money = sku.getPrice().add(goods_discount_plus_pay);
|
|
|
- if (pay_money.compareTo(orderDon.getMoney()) < 0) {
|
|
|
|
|
|
|
+ if (pay_money.compareTo(orderDon.getMoney()) > 0) {
|
|
|
orderDon.setMoney(pay_money);
|
|
orderDon.setMoney(pay_money);
|
|
|
orderDon.setRealMoney(pay_money);
|
|
orderDon.setRealMoney(pay_money);
|
|
|
}
|
|
}
|