| | |
| | | BigDecimal total = promotionInfo.getDiscountAfterPrice().multiply(new BigDecimal(vo.getBuyNum())).setScale(2,RoundingMode.HALF_UP); |
| | | if(orderItemSon.getDiscountAlgorithm() == OrderItemConstants.DISCOUNT_ALGORITHM_TOTAL){ |
| | | orderItemSon.setTotal(promotionInfo.getDiscountAfterPrice().multiply(new BigDecimal(vo.getBuyNum())).setScale(2,RoundingMode.HALF_UP)); |
| | | orderItemSon.setTotal(vo.getTotal().multiply(vo.getDiscount().divide(new BigDecimal(100),15,RoundingMode.HALF_UP)).setScale(2,RoundingMode.HALF_UP)); |
| | | orderItemSon.setDiscountMoney(vo.getTotal().divide(new BigDecimal(vo.getBuyNum()),5,RoundingMode.HALF_UP)); |
| | | orderItemSon.setTotal(orderItemSon.getTotal().multiply(vo.getDiscount().divide(new BigDecimal(100),15,RoundingMode.HALF_UP)).setScale(2,RoundingMode.HALF_UP)); |
| | | orderItemSon.setDiscountMoney(orderItemSon.getTotal().divide(new BigDecimal(vo.getBuyNum()),5,RoundingMode.HALF_UP)); |
| | | //折扣金额 |
| | | orderItemSon.setDiscountOrderPrice(total.subtract(orderItemSon.getTotal())); |
| | | }else{ |