| | |
| | | }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){ |