liujunchi 3 лет назад
Родитель
Сommit
777cec66d6

+ 2 - 2
cooleshow-mall/mall-portal/src/main/java/com/yonge/cooleshow/portal/service/impl/OmsPortalOrderServiceImpl.java

@@ -250,7 +250,7 @@ public class OmsPortalOrderServiceImpl implements OmsPortalOrderService {
             order.setCouponAmount(new BigDecimal(0));
         } else {
             order.setCouponId(orderParam.getCouponId());
-            order.setCouponAmount(calcCouponAmount(orderItemList));
+            order.setCouponAmount(couponAmount);
         }
         if (orderParam.getUseIntegration() == null) {
             order.setIntegration(0);
@@ -1310,7 +1310,7 @@ public class OmsPortalOrderServiceImpl implements OmsPortalOrderService {
         for (OmsOrderItem orderItem : orderItemList) {
             //(商品价格/可用商品总价)*优惠券面额
             BigDecimal couponAmount = orderItem.getProductPrice()
-                                               .divide(totalAmount, 3, RoundingMode.HALF_EVEN)
+                                               .divide(totalAmount, 3, BigDecimal.ROUND_DOWN)
                                                .multiply(coupon);
             orderItem.setCouponAmount(couponAmount);
         }