ChenJiaHe
2024-08-03 2972c6642a2785a4f808d101a58f73c1c0e34d14
订单-促销-算法优化
1个文件已修改
7 ■■■■ 已修改文件
phi_platform_user/src/main/java/com/hx/phip/util/api/OrderCreateUtil.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/util/api/OrderCreateUtil.java
@@ -2512,12 +2512,15 @@
                }else{
                    proportion = BigDecimal.ZERO;
                }
                //根据比例算出积分
                orderItemSon.setTotal(vo.getTotal().multiply(proportion).setScale(2,RoundingMode.HALF_UP));
                //根据比例算出金额
                orderItemSon.setTotal(vo.getTotal().multiply(proportion).setScale(2,RoundingMode.UP));
                if(orderItemSon.getTotal().compareTo(infoTotal) > 0){
                    orderItemSon.setTotal(infoTotal);
                }
            }
            if(orderItemSon.getTotal().compareTo(total) > 0){
                orderItemSon.setTotal(total);
            }
            infoTotal = infoTotal.subtract(orderItemSon.getTotal());
            /*if(orderItemSon.getDiscountAlgorithm() == OrderItemConstants.DISCOUNT_ALGORITHM_TOTAL){