zoujiajian 3 лет назад
Родитель
Сommit
15ab5d069e

+ 4 - 4
netflix-service/src/main/java/com/cyksj/service/order/impl/OrderDonServiceImpl.java

@@ -276,12 +276,12 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
 			}
 			BigDecimal goods_discount_plus_pay = BigDecimal.ZERO;
 			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());
-			});
+			}
 			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.setRealMoney(pay_money);
 			}