chenjiahe
2024-08-02 777de3d921a58fea83244abcd183fafb239418be
订单折扣-单价取值优化
1个文件已修改
10 ■■■■ 已修改文件
phi_platform_user/src/main/java/com/hx/phip/util/api/OrderCreateUtil.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/util/api/OrderCreateUtil.java
@@ -557,7 +557,7 @@
            vo.setTotal(vo.getCurPrice().multiply(buyNum));
            vo.setTotal(vo.getTotal().multiply(vo.getDiscount().divide(new BigDecimal(100),15,RoundingMode.HALF_UP)).setScale(2,RoundingMode.HALF_UP));
            vo.setDiscountMoney(vo.getTotal().divide(buyNum,5,RoundingMode.HALF_UP));
            vo.setCurPrice(vo.getDiscountMoney().setScale(2,BigDecimal.ROUND_UP));
            vo.setCurPrice(vo.getDiscountMoney().setScale(2,RoundingMode.HALF_UP));
        }else{
            //设置优惠前小计,优惠前小计=售价* 商品数量
            vo.setTotal(vo.getCurPrice().multiply(buyNum));
@@ -734,7 +734,7 @@
            vo.setTotal(vo.getCurPrice().multiply(buyNum));
            vo.setTotal(vo.getTotal().multiply(vo.getDiscount().divide(new BigDecimal(100),15,RoundingMode.HALF_UP)).setScale(2,RoundingMode.HALF_UP));
            vo.setDiscountMoney(vo.getTotal().divide(buyNum,5,RoundingMode.HALF_UP));
            vo.setCurPrice(vo.getDiscountMoney().setScale(2,BigDecimal.ROUND_UP));
            vo.setCurPrice(vo.getDiscountMoney().setScale(2,RoundingMode.HALF_UP));
        }else{
            //设置优惠前小计,优惠前小计=售价* 商品数量
            vo.setTotal(vo.getCurPrice().multiply(buyNum));
@@ -987,7 +987,7 @@
            vo.setTotal(vo.getCurPrice().multiply(buyNum));
            vo.setTotal(vo.getTotal().multiply(vo.getDiscount().divide(new BigDecimal(100),15,RoundingMode.HALF_UP)).setScale(2,RoundingMode.HALF_UP));
            vo.setDiscountMoney(vo.getTotal().divide(buyNum,5,RoundingMode.HALF_UP));
            vo.setCurPrice(vo.getDiscountMoney().setScale(2,BigDecimal.ROUND_UP));
            vo.setCurPrice(vo.getDiscountMoney().setScale(2,RoundingMode.HALF_UP));
        }else{
            //设置优惠前小计,优惠前小计=售价* 商品数量
            vo.setTotal(vo.getCurPrice().multiply(buyNum));
@@ -1110,7 +1110,7 @@
            vo.setTotal(vo.getCurPrice().multiply(buyNum));
            vo.setTotal(vo.getTotal().multiply(vo.getDiscount().divide(new BigDecimal(100),15,RoundingMode.HALF_UP)).setScale(2,RoundingMode.HALF_UP));
            vo.setDiscountMoney(vo.getTotal().divide(buyNum,5,RoundingMode.HALF_UP));
            vo.setCurPrice(vo.getDiscountMoney().setScale(2,BigDecimal.ROUND_UP));
            vo.setCurPrice(vo.getDiscountMoney().setScale(2,RoundingMode.HALF_UP));
        }else{
            //设置优惠前小计,优惠前小计=售价* 商品数量
            vo.setTotal(vo.getCurPrice().multiply(buyNum));
@@ -1218,7 +1218,7 @@
            vo.setTotal(vo.getCurPrice().multiply(buyNum));
            vo.setTotal(vo.getTotal().multiply(vo.getDiscount().divide(new BigDecimal(100),15,RoundingMode.HALF_UP)).setScale(2,RoundingMode.HALF_UP));
            vo.setDiscountMoney(vo.getTotal().divide(buyNum,5,RoundingMode.HALF_UP));
            vo.setCurPrice(vo.getDiscountMoney().setScale(2,BigDecimal.ROUND_UP));
            vo.setCurPrice(vo.getDiscountMoney().setScale(2,RoundingMode.HALF_UP));
        }else{
            //设置优惠前小计,优惠前小计=售价* 商品数量
            vo.setTotal(vo.getCurPrice().multiply(buyNum));