chenjiahe
2024-08-01 f50edf39470749f88d8c1d44db58aaeb95544a08
订单折扣-curPrice调节
1个文件已修改
6 ■■■■ 已修改文件
phi_platform_user/src/main/java/com/hx/phip/util/api/OrderCreateUtil.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
phi_platform_user/src/main/java/com/hx/phip/util/api/OrderCreateUtil.java
@@ -547,7 +547,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));
        }else{
            //设置优惠前小计,优惠前小计=售价* 商品数量
            vo.setTotal(vo.getCurPrice().multiply(buyNum));
@@ -724,6 +724,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));
        }else{
            //设置优惠前小计,优惠前小计=售价* 商品数量
            vo.setTotal(vo.getCurPrice().multiply(buyNum));
@@ -976,6 +977,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));
        }else{
            //设置优惠前小计,优惠前小计=售价* 商品数量
            vo.setTotal(vo.getCurPrice().multiply(buyNum));
@@ -1098,6 +1100,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));
        }else{
            //设置优惠前小计,优惠前小计=售价* 商品数量
            vo.setTotal(vo.getCurPrice().multiply(buyNum));
@@ -1205,6 +1208,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));
        }else{
            //设置优惠前小计,优惠前小计=售价* 商品数量
            vo.setTotal(vo.getCurPrice().multiply(buyNum));